List of utility methods to do Memory Used
long | memoryUsed() memory Used Runtime rt = Runtime.getRuntime();
return rt.totalMemory() - rt.freeMemory();
|
long | memoryUsed() Returns the amount of memory on the heap that is currently being used by the JVM. Runtime rt = Runtime.getRuntime();
return rt.totalMemory() - rt.freeMemory();
|
long | memoryUsedInMB() Returns the amount of memory currently used by the JVM, in megabytes. return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / MEGA;
|
String | stringMemoryUsedInMB() Returns the amount of memory currently used by the JVM, in megabytes, as a string. String ret = String.format("%,d MB", memoryUsedInMB()); return ret; |
long | usedMemory() used Memory return S_RUNTIME.totalMemory() - S_RUNTIME.freeMemory();
|
long | usedMemory() used Memory return Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
|
long | usedMemory() Returns the amount of memory currently used by the Java Virtual Machine. return allocatedMemory() - freeAllocatedMemory();
|
long | usedMemory() Return the total memory currently in use. return runtime.totalMemory() - runtime.freeMemory();
|
long | usedMemory() used Memory return RUNTIME.totalMemory() - RUNTIME.freeMemory();
|
double | usedMemory() Returns used memory in MB Runtime runtime = Runtime.getRuntime();
return usedMemory(runtime);
|