The memory allocation of objects, from the general direction will be allocated on the heap, the object is mainly allocated to the new generation of Eden area, if the local thread allocation cache is started, will be prioritized on the Tlab by the thread allocation.
1. Object Precedence in Eden area allocation: In most cases, objects are allocated in the New Generation Eden area.
2. Large objects go straight to the old age: large objects here refer to Java objects that require a large amount of contiguous memory space, such as long strings and arrays
3. Long-term survival of the object will enter the old age: a certain number of minor GC after the still surviving objects, will enter the old age
4. Dynamic Object Age judgment: In order to dynamically better adapt to the memory status of different programs, virtual machines do not always require that the age of the object must reach Maxtenuringthershod to be promoted to the old age.
5. Space Allocation Guarantee
Java Memory allocation policy