7.2.2 Relation between the lifespan of an object and its age
The number of times copy GC is executed for an object is called the age of the object.
The following figure shows the relation between the lifespan and the age of an object:
|
|
After the application has started, the initialization process has finished, and the copy GC has been executed a number of times, the objects with a long lifespan that are required for a long period, move to the Tenured area. As a result, shortly after starting the application, the Java heap reaches a stable state and most of the Java objects that get created are the objects that have a short lifespan. Especially, if the tuning of the New area has been performed appropriately, then after the Java heap stabilizes, a majority of the objects that are objects with a short lifespan get collected during the first copy GC.