JVM Part 3 Runtime Data Area-Virtual Machine Stack and PC Program Counter

Table of contents

1. Threads in JAVA

 2. Stack area 

2.1 Stack frame

2.2 Possible exceptions in the stack

2.3 Set stack size

3. Program counter (PC)

 4. The role of PC and stack

 5. Common interview questions about stack


       The virtual machine consists of three parts, the class loading subsystem, the runtime data area, and the execution engine. The runtime data area also includes the method area, heap area, stack area, program counter, and local method stack. This article explains the virtual machine stack and program counter.

 

 

1. Threads in JAVA

 

 2. Stack area 

  

2.1 Stack frame

The stack is composed of stack frames, and each stack frame has its own internal structure.

 

 

 

2.2 Possible exceptions in the stack

 

2.3 Set stack size

 

3. Program counter (PC)

 

 4. The role of PC and stack

 5. Common interview questions about stack

 

 

 

Summary of thread safety of local variables: What escapes is not thread safe, what does not escape is thread safe

Guess you like

Origin blog.csdn.net/hsy12342611/article/details/132528398