Search code examples
javaservletsjvmmemory-profiling

How to Profile JVM memory in the code?


I am writing a servlet that I can't test in Eclipse, I need to run on server. I want to do memory profiling and pinpoint any leaks. So, I think I need write debug statements that can tell me current memory usage. Can someone point me to good references on how to do this and/or which classes in the JDK do this ?

Note that I can't use the "Eclipse MAT".


Solution

  • Can't you use the built-in tool in the jdk jvisualvm?