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