Home » Posts tagged 'Garbage Collection'

Tag Archives: Garbage Collection

Stop the world phase

Garbage Collection literally stops the world.

When a GC occurs in young generation space, it is completed quickly as the young generation space is small.

Young generation space is the space where newly instantiated objects are stored. Internally, this space has two survivor spaces which are used when GC occurs and the objects which still have references are shifted to a survivor space. If an object survives many cycles of GC, it is shifted to old generation space.

Problem is when GC occurs in Old generation space which contains long lived objects. This space uses a lot more memory than the young generation and when GC occurs in old generation, it literally halts all the requests made to that JVM process.

So, the world literally stops !!