Java Memory allocation policy

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.