Runtime Data Area and Instruction Set
jvms 2.4 2.5
指令集分类
- 基于寄存器的指令集
- 基于栈的指令集
Hotspot中的Local Variable Table = JVM中的寄存器
Runtime Data Area
PC 程序计数器
存放指令位置
虚拟机的运行,类似于这样的循环:
while( not end ) {
取PC中的位置,找到对应位置的指令;
执行该指令;
PC ++;
}
JVM Stack
- Frame - 每个方法对应一个栈帧
- Local Variable Table
- Operand Stack
对于long的处理(store and load),多数虚拟机的实现都是原子的
jls 17.7,没必要加volatile - Dynamic Linking
https://blog.csdn.net/qq_41813060/article/details/88379473
jvms 2.6.3 - return address
a() -> b(),方法a调用了方法b, b方法的返回值放在什么地方
Heap
Method Area
- Pe