4
votes

I am analyzing a OutOfMemory issue. I got a dump of 800 MB (.hprof file) when i open it in MAT it shows heap size 53.2 MB as below

enter image description here

Same dump i opened in Java VisualVM and I see Heap size around 769 MB

  Date taken: Tue Mar 18 05:25:59 IST 2014
    File: C:\Users\ABC\Desktop\Memory\MemoryDump.hprof
    File size: 789.1 MB
    Total bytes: 768,683,549
    Total classes: 9,288
    Total instances: 7,081,010
    Classloaders: 2,924
    GC roots: 2,496
    Number of objects pending for finalization: 0

I read one article which shows MAT skips unreachable objects so doesnt report exact heap size.

What does Total Bytes of VisulaVM shows here : Heap Size or (Heap + Non Heap size) or anything else?

2

2 Answers

0
votes

Total Bytes is the sum of the size of all the objects in the heap dump.

0
votes

Eclipse MAT removes the unreachable object and other junk left over by GC in JVM. Read more:

http://wiki.eclipse.org/MemoryAnalyzer/FAQ#Problems_Interpreting_Results