Runtime lRuntime = Runtime.getRuntime();
out.println("Free Memory: "+lRuntime.freeMemory()/1024/1024+"M"); //已分配的空间中未被使用的部分
out.println("Max Memory: "+lRuntime.maxMemory()/1024/1024+"M"); //最大可分配的空间
out.println("Total Memory: "+lRuntime.totalMemory()/1024/1024+"M"); //已分配的空间