Java Memory Max getMaximumMemory()

Here you can find the source of getMaximumMemory()

Description

get Maximum Memory

License

Open Source License

Declaration

static int getMaximumMemory() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static final Runtime RUNTIME = Runtime.getRuntime();

    static int getMaximumMemory() {
        long maxMem = RUNTIME.maxMemory();

        if (maxMem > Integer.MAX_VALUE) {
            return Integer.MAX_VALUE;
        }//from  www. j a  v  a2  s . c  om

        return (int) maxMem;
    }
}

Related

  1. checkMaxMemory()
  2. freeMaxMemory()
  3. getJavaMaxMemory()
  4. getJvmMaxMemory()
  5. getMaximumMemory()
  6. getMaximumMemory()
  7. getMaximumMemory()
  8. getMaxMemory()