« Previous - - Next »

[java] how to detect memory leak

19 July 2007

hprof is the most convinient way.
You must add “-Xrunhprof” to java VM.
For example, when you would like to trace “ex.test.MainClass”, a command is

% java -Xrunhprof ex.test.MainClass

hprof makes java.hprof.txt.
You can get heap, class, reference information, etc, from the file.

Posted in programming | Trackback | del.icio.us | Top Of Page

No comments yet

Leave a Reply