List of utility methods to do Memory Max
boolean | checkMaxMemory() check Max Memory return Runtime.getRuntime().totalMemory() >= Runtime.getRuntime().maxMemory();
|
long | freeMaxMemory() Returns the amount of memory available for use by the Java program. return maxMemory() - usedMemory();
|
long | getJavaMaxMemory() Return maximum amount of memory the JVM will attempt to use return Runtime.getRuntime().maxMemory();
|
long | getJvmMaxMemory() get Jvm Max Memory return Runtime.getRuntime().maxMemory() / K2M;
|
int | getMaximumMemory() Returns the available maximum amount of memory (in MB) this JVM can use. return Math.round((float) (Runtime.getRuntime().maxMemory() / 1048576L)); |
long | getMaximumMemory() get Maximum Memory long maximumMemory = Runtime.getRuntime().maxMemory(); long totalMemory = Runtime.getRuntime().totalMemory(); if ((maximumMemory <= 0) || (maximumMemory == Long.MAX_VALUE)) { maximumMemory = totalMemory; return maximumMemory; |
long | getMaximumMemory() get Maximum Memory return Runtime.getRuntime().maxMemory() / 1024 / 1024;
|
int | getMaximumMemory() get Maximum Memory long maxMem = RUNTIME.maxMemory(); if (maxMem > Integer.MAX_VALUE) { return Integer.MAX_VALUE; return (int) maxMem; |
long | getMaxMemory() get Max Memory return bytesToMegabytes(Runtime.getRuntime().maxMemory());
|
long | getMaxMemory() get Max Memory return Runtime.getRuntime().maxMemory();
|