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

本文详细介绍了Java虚拟机(JVM)加载Class文件的过程,包括从Class文件加载到内存的具体步骤,链接阶段中准备阶段的工作原理,以及解决符号引用的具体机制。此外,还概述了JVM的内存模型及执行器组件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 default values.

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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

自驱

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值