The structure of the runtime data area is illustrated below:
It can be divided into 5 zones, which areMethod area, heap area, virtual machine stack, local method stack, program counterThe following is a brief description of each of the modules. Here is a general description of the role of each module, which will be expanded in a later article.
The class loading subsystem loads class information into themethodology areaThe program creates threads when it runs, each thread has its ownvirtual machine stack、Local method stack, program counterIf the thread is executing a method, a stack frame is created for each method executed, or a local method stack frame is created if the JVM is executing a local method. Objects created during thread execution are placed in thelandfill. The purpose of the program counter is to record the address of the next instruction to be executed by the current thread.
The method area and heap area are shared by threads. The class loading subsystem loads classes into the method area; all objects created by threads are placed in the heap area;
Stacks in the Java method stack area, stacks in the local method stack area, and program counters are created for each thread and are exclusive to the thread.
Later articles expand on each area.