当前位置:网站首页>JVM之虚拟机栈之动态链接
JVM之虚拟机栈之动态链接
2022-06-29 09:16:00 【Hao_JunJie】
一、前提:本篇我们主要讲解栈帧中的动态链接(指向运行时常量池方法的引用)
二、概念:

先来看一下上图,有时候我们将方法返回地址、动态链接、一些附加信息统称为帧数据区
(1)每一个栈帧内部包含一个指向运行时常量池中该栈帧所属方法的引用,包含这个引用的目的就是为了支持当前方法的代码能够实现动态来链接。比如:invokdynamic指令。
(2)在Java源文件被编译到字节码文件中时,所有的变量和方法引用都作为符号引用,保存在class 文件的常量池里。
比如:描述一个方法调用了另外的其他方法时,就是通过常量池中指向方法的符号引用来表示的,那么动态链接的作用就是为了将这些符号引用转换为调用方法的直接引用
eg:

反编译后:


发现变量和方法的符号引用都存在于class 文件中的常量池中。
三、请看图解:

边栏推荐
- ORA-01950 对表空间无权限
- 2020-09-29 非商品模板化代码层次 rapidjson库
- InvalidConnectionAttributeException异常处理
- Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 3 of 3-byte UTF-8
- Invalidconnectionattributeexception exception exception handling
- 聊聊你理解的线程与并发
- CROSSFORMER: A VERSATILE VISION TRANSFORMER BASED ON CROSS-SCALE ATTENTION
- Lc236. nearest common ancestor of binary tree
- 完美二叉树、完全二叉树、完满二叉树
- 遍历vector容器中的对象的方式
猜你喜欢

Lc236. nearest common ancestor of binary tree

UE4 compile a single file (VS and editor start respectively)

Application of decorator mode, packaging ServletRequest and adding addparameter method

KiCad学习笔记--快捷键

Visual assist plug-in settings for UE4 vs

How to traverse objects in the vector container

1424. 对角线遍历 II

Deep Learning-based Automated Delineation of Head and Neck Malignant Lesions from PET Images

Segmentation of Head and Neck Tumours Using Modified U-net

MySQL configuring master-slave databases
随机推荐
Do you know what BFD is? This article explains the principle and usage scenarios of BFD protocol in detail
动态规划总结
Making of simple addition calculator based on pyqt5 and QT Designer
Set up lamp environment under cenos7
C语言中通过sprintf()函数构造sql语句
数据治理:数据治理在数据中台下的解决方案
mysql修改自动递增初始值
Cisco ASA、FTD和HyperFlex HX的漏洞分析复现
Is it safe to open an account for stock speculation? Is it reliable?
Visual assist plug-in settings for UE4 vs
leetcode MYSQL数据库题目176
A comparison of methods for fully automatic segmentation of tumors and involved nodes in PET/CT of h
Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 3 of 3-byte UTF-8
Deep Learning-based Automated Delineation of Head and Neck Malignant Lesions from PET Images
監控數據源連接池使用情况
Student增删gaih
1424. diagonal traversal II
阿里云防火墙配置,多种设置方式(iptables和fireward)
Official STM32 chip package download address stm32f10x stm32f40x Download
Data governance: data standard management (Part III)