Profile Image
PiPi

When an Out of Memory (OOM) occurs, why is there nearly 50% of unreachable objects in the heap?

I analyzed the heap dump that led to the OOM error using the MAT (Memory Analyzer Tool). The total heap size was 8GB, and I found that the memory allocated by threads only amounted to 3.2GB, while unreachable objects occupied 4GB.

 

The garbage collector in use was G1.

 

Regarding your questions:

 

(1) Under what circumstances would there be nearly 50% of unreachable objects?

 

  • g1gc

Please Sign In or to post your comment or answer

Profile Image

Unni Mana

This is completely controlled by GC at that point of time. But there could be several factors that will affect such as GC strategies, GC timing etc. These could be the reasons why 50% objects are unreachable in the heap.

Profile Image

PiPi

Hello Unni Mana,

 

Thank you for your help and answers!

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • g1gc