Several important concepts of Java Virtual machine stack
Java VM stack = java Virtual machine Stacks = JVMs
1. JVMS thread Private, life cycle is the same as thread
2. JVMS describes the memory model that is performed by the Java method: JVMS creates a "stack frame" stack frame when the method executes, which records the local variable table, the operand stack, the dynamic link, the method exit, and so on, each method from the call to the completion of the process, is the process of stacking frames into stacks in JVMs
3, the local variable table holds the basic data type, object reference, ReturnAddress (byte code instruction address), long and double occupy 2 local variable space (slot), the other occupies 1 space;
The memory space required for a local variable table is allocated during compilation, and when a method is entered, it is fully deterministic how much local variable space is allocated in the frame, and the size of the local variable table cannot be changed while the method is running
4, JVMs two kinds of anomalies
(1) Thread request has a stack depth greater than the JVM allows and throws a Stackoverflowerror exception
(2) The JVM can be dynamically extended and throws a OutOfMemoryError exception if the extension cannot request enough memory
Java Virtual Machine stack