Java Virtual Machine Solution composition One
Java Virtual Machine Solution composition Two
Java Virtual machine Structure Diagram III
"1" Class loading system
---> is responsible for loading class information from the file system or network and storing it in the memory space of the method area
"2" Java heap
Established---> virtual machine startup. Java main memory work area.
---> Storage: Java object instance.
---> All threads sharing
"3" Method area
---> Storage: class information, run constant pool information, string literals, numeric constants (memory mappings in the constant pool portion of a class file)
"4" Direct memory
--->java's nio library allows Java programs to use direct memory.
---> The memory space that is applied directly to the system outside of the Java heap.
---> Access to direct memory is faster than the Java heap. For performance reasons, the use of direct memory may be considered in frequently read-write situations. Because the heap is directly inside, its size is not directly limited by the maximum heap size specified by XMX, but the system memory is limited. The sum of the Java heap and direct memory is still limited by the maximum memory given by the operating system
"5" garbage collection system
---an important part of the >java virtual machine.
---> Recycle garbage space on the method area, Java heap, direct memory.
"6" Java
---> Each of the Java Virtual machine threads has a private java.
---> A thread is created when Java is created.
--->java Save frame information (local variables, method parameters) and method calls and return are closely related
"7" Local method
---> is very similar to Java.
---> is different from Java's method invocation for Java. Local methods are used for calls to local methods.
"8" PC register
---> is also a private space for each thread. The Java Virtual machine creates a PC register for each Java thread.
---> A Java thread is always executing a method, and the method being executed is called the current method. If the current method is not a local method, the PC register executes the instruction that is currently being executed. If the current method is a local method, then the value of the PC register is undefined
"9" Execution engine
---One of the most core components of the >java virtual machine, he is responsible for executing the virtual machine's bytecode.
(1) Java Virtual machine concept and structure diagram