File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Performance and the fly likes taking a heap dump Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "taking a heap dump" Watch "taking a heap dump" New topic

taking a heap dump

gaurav abbi
Ranch Hand

Joined: Jan 05, 2007
Posts: 108
hi, can anybody suggest me a way to take heap dump, which can help me to analyze and debug memory leak.
i tried jmap, but that information is not very helpful for me.

thanks,<br />gaurav abbi
Henry Wong

Joined: Sep 28, 2004
Posts: 20538

Taking a heap dump, when you don't know what is leaking, is probably not the best course of action. It is probably better to use a profiler and monitor the heap as the application is leaking -- to see what grows.

Regardless, you still need to understand the application, in order to understand what should be growing and what shouldn't be growing.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
rajesh bala
Ranch Hand

Joined: Jan 14, 2003
Posts: 66
Try latest JProfiler. It is very stable and good at detecting memory leaks.

If you can't afford, you can check their trial version. However I would highly recommend it, if you can buy it.

I have used it and extremely happy with its stability compared to JProbe. I am not advertising or working in JProfiler.

Fran├žois Mercier

Joined: Jan 12, 2007
Posts: 4
Try the excellent Memory Analyzer :
I agree. Here's the link:
subject: taking a heap dump
It's not a secret anymore!