Jvm runtime data on regional issues

  Java virtual machine memory division during the execution of the program will manage it for different regions. They each region has its own purpose, creation and destruction of time. Some will create a virtual machine created with the process, as some will start and end of the thread is created and destroyed. Run-time data area is divided into several sections about -> thread shared portion (heap, the method area) thread isolated portion (VM stack, native method stacks, program counter)


1. Heap main target is located, is shared by all threads in the Java virtual machine is the biggest piece

         2. The method area to store information Constant static class variable in time in time has been loaded compiled bytecode runtime constant pool is part of the method area

       3. VM stack is a private thread execution method is described in Java memory model is created every time a method creates a stack frame for a method for storing local variable table for export information from the operand stack dynamically linked to the implementation of this corresponds to the end of a stack the stack and the stack frame.

 4. The program counter is private to the thread of his description of the bytecode execution thread the line number of multi-threaded Java virtual machine is achieved by alternately switching time of multithreaded and processor allocation. Any time a processor can execute only one thread of instructions, when a thread switch to the original thread can be restored to the correct position, you need a program counter, the counter for each thread without disturbing each other belong to private thread

Published 27 original articles · won praise 12 · views 10000 +

Guess you like

Origin blog.csdn.net/u013297345/article/details/77979491