Has anybody used Eclipse memory manager to detect memory leak in java codes? Can anybody recommend a good place to look for information regarding using memory manager? I read something online, it suggests that i need to let the program run until it crashes (out of memory error occurs), which will generates a crash report. Then use the memory manager to open this report to examine where the memory leak might occur. Is this how everybody uses memory manager?
Share
Though -XX:+HeapDumpOnOutOfMemoryError can be useful, my current workflow for using the Eclipse Memory Manager is:
jmap -dump:format=b,file=dump.hprof <PID>I usually start working with the histogram and dominator tree views to see if anything seems out of whack, then drill down from there.
VisualVM can be useful but seems much less efficient than EMM when working with a heap dump (EMM caches a lot of information on loading the heap dump). Netbeans Profiler is nice for getting the locations of allocations and for time profiling.