【知识库】--JVM 原理指导(java8 )(208)

来源:互联网 发布:linux开启防火墙命令 编辑:程序博客网 时间:2024/06/06 02:01

1 .class 文件  jvm整体示意


2 .class -->到内存


3 加载class过程

link---prepare:静态域默认值设置,继承约束检查,接口实现约束检查

Preparation involves creating the static fields for a class or interface and initializing such fields to their defaultvalues.

This does not require the execution of any Java Virtual Machine code; explicit initializers for static fields are executed as part of initialization , not preparation.


link---resolve: 主要动态引用的确定

The Java Virtual Machine instructions anewarraycheckcastgetfieldgetstaticinstanceofinvokedynamicinvokeinterfaceinvokespecialinvokestaticinvokevirtualldcldc_w,multianewarraynewputfield, and putstatic make symbolic references to the run-time constant pool. Execution of any of these instructions requires resolution of its symbolic reference.

Resolution is the process of dynamically determining concrete values from symbolic references in the run-time constant pool.

a specific invokedynamic instruction is a call site object bound to that specific invokedynamic instruction


4 内存模型-方法区和堆


5 内存模型--pc计数器 栈 本地方法区


6 执行器--解释器 ,Just IN Time 编译器 ,hotspot profiler ,GC