Prior to JDK7, heap memory was divided into three regions: new generation, old generation, and permanent generation. After JDK8, the permanent generation was completely removed and replaced by the meta space.

The Cenozoic is divided into Eden, S0 and S1 zones. The object is first allocated in Eden. After a new generation garbage collection, if the object is still alive, it will be age +1 and enter S0 or S1. When the age reaches the threshold (default 15), it will enter the old generation.

Dynamic age calculation: Hotspot traverses through all objects and accumulates their age by age. When it reaches halfway to the survivor area, it takes the lower value of this age in the maxTenuringThreshold as the new promotion age.