Example #1
0
 public double getJavaMemoryUsage() {
   return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())
       / 1024.0
       / 1024.0;
 }
Example #2
0
 public double getJavaMaxMemory() {
   return Runtime.getRuntime().maxMemory() / 1024.0 / 1024.0;
 }