JMemProf is a live Java memory profiler suitable for deployment in web containers such as JBoss, Tomcat and others. JMemProf allows you to retrieve memory profile information while your application is running.
Although Java implements automatic garbage collection, this does not solve the problem of programmers hanging onto references and thus causing memory leaks. ie. "if you don't put out your garbage, it won't get collected". JMemProf aims to add dynamic visibility to memory usage in Java web applications; memory profile information can be viewed easily through a Servlet based web interface while the application is running. It is much more dynamic and easily understandable than that of the hprof heap profiler bundled with the J2SDK.
JMemProf is implemented in C using the JVMPI (JVM Profiling Interface). There are two parts, a shared object loaded into the JVM at startup, and a WAR file containing a Java servlet that uses a JNI interface to the profiling extension to retrieve and display memory profile information collected during execution.URL: http://oss.metaparadigm.com/jmemprof/