List of utility methods to do Memory Free
double | getFreeMemoryInMb() get Free Memory In Mb return Runtime.getRuntime().freeMemory() / MB_Numeral;
|
long | getFreeMemoryKb() get Free Memory Kb return kb(Runtime.getRuntime().freeMemory());
|
long | getFreeMemoryMB() get Free Memory MB long freeMemBytes = Runtime.getRuntime().freeMemory(); return freeMemBytes / (1024 * 1024); |
long | getJavaFreeMemory() Return total amount of free memory available to the JVM return Runtime.getRuntime().freeMemory();
|
long | getJvmFreeMemory() get Jvm Free Memory return Runtime.getRuntime().freeMemory() / K2M;
|
long | getMemoryFree() get Memory Free return Runtime.getRuntime().freeMemory();
|
int | getMemoryFree() Get the free memory in KB. collectGarbage(); Runtime rt = Runtime.getRuntime(); long mem = rt.freeMemory(); return (int) (mem >> 10); |
long | getSystemFreeMemory() get System Free Memory return Runtime.getRuntime().freeMemory();
|
int[] | getTilesBasedOnFreeMemory(int rows, int cols) Calculates optimal tile size for the actual free memory. long freeMemory = Runtime.getRuntime().freeMemory(); int tileSizeY = 256; int tileSizeX = 256; if (freeMemory > 8L * cols) { tileSizeX = cols; tileSizeY = (int) (freeMemory / 8) / cols; if (tileSizeY > rows) { tileSizeY = rows; ... |
boolean | hasFreeMemory(float margin) has Free Memory return usedMemory() < (1f - margin) * ((float) maxMemory()); |