Wednesday, October 03, 2007

Detecting memory leak in perm space

Use Jstat to verify if there is a memory leak in perm space. Jstat is available only from JDK 5.0 however you can connect to 1.4 JVM from a 1.5 jstat.
Once you confirmed that there is a memory leak in perm space, use -verbose:class to find out the offending class. look for the class which is repeatedly getting loaded but *not* getting unloaded.

No comments: