List of utility methods to do Memory Free
double | freeMemoryMB() Get free memory in megabytes return megaBytes(Runtime.getRuntime().freeMemory());
|
double | freeMemoryPercents() Returns percents of free memory. Runtime runtime = Runtime.getRuntime(); return (double) runtime.freeMemory() / runtime.totalMemory() * 100.0; |
void | freeReserveMemory() Free up the reserve memory. reserveMemory = null; |
long | getFreeJVMMemoryMB() get Free JVM Memory MB return Runtime.getRuntime().freeMemory() / mb;
|
long | getFreeLiveMemory() get Free Live Memory Runtime r = Runtime.getRuntime();
r.gc();
return r.freeMemory();
|
int | getFreeMemory() Returns the free amount of memory (in MB) belonging to JVM. return Math.round((float) (Runtime.getRuntime().freeMemory() / 1048576L)); |
long | getFreeMemory() Gets the JVM free memory. return getFreeMemory(false);
|
long | getFreeMemory() get Free Memory lastMemoryReading = runtime.freeMemory();
return lastMemoryReading;
|
long | getFreeMemory(boolean preRunGarbageCollector) get Free Memory Runtime rt = getRuntimeAndRunGC(preRunGarbageCollector);
return bytesToMegabytes(rt.freeMemory());
|
long | getFreeMemoryForAppInKB() Gets the free memory in kilobytes is available for the application. return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024;
|