Go JVM Memory Management-----Heap Memory

Source: Internet
Author: User

Source: http://blog.csdn.net/yu422560654/article/details/7952613

Heap Heap Memory understanding

A JVM instance has only one heap of memory, and the size of the heap memory can be adjusted. After the class loader reads the class file, it needs to put the class files, methods, constants into the heap memory so that the executor executes, and heap memory is divided into three parts:

1. Permanent Space Permanent Storage area

The persistent storage area is a resident memory area that holds the class,interface metadata that is carried by the JDK itself, that is, it stores the required class information for the running environment, the data that is loaded into this area is not reclaimed by the garbage collector, and the memory that is occupied by this zone is freed by shutting down the JVM.
2.Young Generation Space New District
The newborn area is the birth, growth, and extinction area of a class, where a class is generated, applied, and finally collected by the garbage collector, ending life.
The new district is divided into two parts: EdenSpace and the Survivor area (Survivor Pace).
All the classes were created in the Eden District by New. There are two surviving areas: Zone 0 (Survivor 0 space) and 1 (Survivor 1 space). When the space in Eden is exhausted, the program needs to create objects, and theJVM's garbage collector will garbage reclaim the Garden of Eden and destroy objects in the Eden area that are no longer referenced by other objects. The remaining objects in the Garden of Eden are then moved to the surviving zone 0. If the surviving zone 0 is full, then the area will be garbage collected and then moved to Zone 1. What if the 1 districts are full? Then move to the retirement area.
3. Tenure Generation Space Foster Old
The pension area is used to save Java objects that are screened out from the newborn area , and the general pool objects are active in this area. The three districts are as follows:

Go JVM Memory Management-----Heap Memory

Related Article

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.