Http://www.cnblogs.com/preftest/archive/2011/12/08/2281322.htmljava Memory Overflow Analysis tool: Jmap use combat in a solution system Tomcat is always in memory, Then crashes the problem when used to the Jmap. 1 using the command in the environment is linux+jdk1.5 above, this tool is self-bringing, path under jdk_home/bin/jmap-histo pid>a.log 2 Output Summary Size Count Class Description- ------------------------------------------------------353371288 9652324 char[] 230711112 9612963 java.lang.St Ring 139347160 114865 byte[] 76128096 3172004 java.util.hashtable$entry 75782280 3157595 Com.test.uti L.ipseeker$iplocation 25724272 9115 java.util.hashtable$entry[] 9319968 166428 Org.apache.tomcat.util.buf.Messa Gebytes 8533856 32889 int[] found a large number of string and custom objects com.test.util.ipseeker$iplocation exist, and the checker found there was a memory overflow. Modify the program to go online again with Jmap crawl memory data: 146881712 207163 byte[] 98976352 354285 char[] 42595272 53558 int[] 11515632 479818 Java.util.hashmap$entry 9521896 59808 java.util.hashmap$entry[] 8887392 370308 com.test.bean.UnionIPEntry 8704808 1554 Org.apache.tomcat.util.buf.MessageBytes 8066880 336120 java.lang.String memory overflow problem eliminated. Note: This jmap is used when the JVM is in suspended animation, can only be used in order to solve the problem when the service is paralyzed, otherwise it will cause service interruption.
Java Memory Overflow Analysis tool