How many parts does the Java virtual machine architecture consist of?

The architecture diagram of the Java virtual machine is as follows:

The operating sequence of the Java virtual machine system:

The class file stores information into the runtime data area (including method area, heap, Java stack, program counter, and local method stack) through the class loading subsystem, and the execution engine interprets and executes it through certain specifications. Local methods can call the runtime data area through the execution engine or themselves.

Java virtual machine architecture explained:

1) Class loader subsystem

Classloader is a subsystem of JVM, used to load class files.

2) Method area

The square) area stores each class structure, such as runtime constant pool, field and method data, method code, etc.

3) Heap

It is the runtime data area of ​​the allocated object.

4) Java stack

It saves local variables and partial results, and plays a role in method calls and returns. Each thread has a private JVM stack, and threads are created at the same time. A new frame is created every time the method is called. The frame is destroyed when its method call is completed.

5) Program counter

The program counter, which contains the address of the Java virtual machine instruction currently being executed.

6) Local method stack

It contains all the native methods used in the application.

7) Execution engine

Execution engine includes: virtual processor, interpreter, JIT compiler

Guess you like

Origin blog.csdn.net/keepfriend/article/details/113849218