From the Debug view, when looking at the Variables tab, is there a way to easily see how much of the heap a given variable is consuming? (Something akin to Java's Heap Analysis Tool)
2 Answers
I think this will help:
The Eclipse Memory Analyzer is a fast and feature-rich Java heap analyzer that helps you find memory leaks and reduce memory consumption.
Use the Memory Analyzer to analyze productive heap dumps with hundreds of millions of objects, quickly calculate the retained sizes of objects, see who is preventing the Garbage Collector from collecting objects, run a report to automatically extract leak suspects.
2 Comments
A half-measure would be to watch for changes in the total RunTime's used ram with something like:
Runtime rt = Runtime.getRuntime();
long currInUse = rt.totalMemory() - rt.freeMemory();