I'm trying to find a possible memory leak using the Eclipse Memory analyzer, but when I search for some objects, I cannot get the heap size for it and the columns "Shallow Heap/Retained Heap" are always empty.
When I right click on any object and do "Calculate Precise Retained Size", nothing happens. Is there something I need to run before I'm able to see some data? I see the retained heap size in histogram, but nowhere else(like in dominator tree).
Measuring the memory usage of eclipseGoto Window > Preferences > General and enable Show heap status and click OK.
Shallow heap is the memory consumed by one object. Retained set of X is the set of objects which would be removed by GC when X is garbage collected. Retained heap of X is the sum of shallow sizes of all objects in the retained set of X, i.e. memory kept alive by X.
shallow size: the size of the object itself. retained size: the size of the object itself, plus the size of other objects that are kept alive by this object.
I set preference → Memory Analyzer → Bytes Display to KB and it showed retained heap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With