How to get memory footprint?

Hi-Xrunhprof is too expensive for cpu cycles, is there another way to find which object eat up all my memory?Thanksj2xe
[147 byte] By [jxxea] at [2007-10-3 12:00:19]
# 1
Yes, use -XX:+PrintClassHistogram and depending on your OS send the java program a QUIT signal. The Heap will then be dumped along with the Thread dump.Windows: Ctrl-breakUnix: Ctrl-/orkill -QUIT <process id>
Caffeine0001a at 2007-7-15 14:36:42 > top of Java-index,Core,Monitoring & Management...
# 2
Also in 1.6 you can issue a heap dump from jconsoleSee the section HotSpot Diagnostic MXBean at http://download.java.net/jdk6/docs/technotes/guides/management/jconsole.html.
Caffeine0001a at 2007-7-15 14:36:42 > top of Java-index,Core,Monitoring & Management...
# 3
Thanks for answering my questions.
jxxea at 2007-7-15 14:36:42 > top of Java-index,Core,Monitoring & Management...
# 4
best solution is to use a profiler
CarrieHunta at 2007-7-15 14:36:42 > top of Java-index,Core,Monitoring & Management...