[jvm] runtime data area

1. Runtime data area

Insert image description here

1. Function
  • 1. Memory is a very important system resource. It is the intermediate warehouse and bridge between the hard disk and the CPU, and carries the real-time operation of the operating system and applications. The JVM memory layout stipulates the memory application, allocation, and management strategies of Java during operation, ensuring the efficient and stable operation of the JVM. Different JVMs have some differences in their memory division methods and management mechanisms.
2. Description
  • 1. The Java virtual machine defines several runtime data areas that will be used during program running. Some will be created when the virtual machine starts and are destroyed when the virtual machine exits.
  • 2. Others correspond to threads one-to-one. The data areas corresponding to threads will be created and destroyed as the threads start and end.
  • 3. Each thread has an independent program counter, stack and local stack
  • 4. Shared heap and off-heap memory (permanent generation or metaspace, code cache) between threads
  • 5. A jvm has only one Runtime instance, which is the runtime environment, which is equivalent to the runtime environment of the memory structure.
3. Thread Sharing and Private Areas

Insert image description here

Guess you like

Origin blog.csdn.net/qq_32088869/article/details/132483282