JVM1.8 heap memory

1. The heap is the area with the largest JVM memory footprint and the most complex management. Its only purpose is to store object instances: almost all object instances and arrays are allocated on the pair. (The jvm stack generally allocates 8 basic types and reference types. However, the compiler will perform escape analysis. If a local object will not be referenced by code other than the method body, then it will be directly allocated on the stack when the memory space is allocated. This can save GC performance.) After 1.7, the string constant pool is stripped from the permanent generation and stored in the heap. The heap has its own further memory partitioning, according to the GC generational collection perspective, please refer to the following figure:

 

2 heap space memory allocation (by default)

  • Old age: two-thirds of the heap space
  • Young generation: one-third of the heap space
    • Eden District: 8/10 of the young generation space
    • survivor0: 1/10 of the young generation space
    • survivor1: 1/10 of the young generation space

Guess you like

Origin blog.csdn.net/zsj777/article/details/89332227