team470 发表于 2017-1-22 07:17:12

tomcat内存设置的方法

  测试tomcat大小,jsp页面
<%
Runtime lRuntime = Runtime.getRuntime();
out.println("*** BEGIN MEMORY STATISTICS ***<br/>");
out.println("Free Memory: "+lRuntime.freeMemory()+"<br/>");
out.println("Max   Memory: "+lRuntime.maxMemory()+"<br/>");
out.println("Total Memory: "+lRuntime.totalMemory()+"<br/>");
out.println("Available Processors : "+lRuntime.availableProcessors()+"<br/>");
out.println("*** END MEMORY STATISTICS ***");
%>
  转载自:http://tony-0529.iteye.com/blog/618105
页: [1]
查看完整版本: tomcat内存设置的方法