当前位置:网站首页>JVM class loading mechanism
JVM class loading mechanism
2022-07-07 20:00:00 【Whiteye too white】
Class loading mechanism
load —> Connect ( verification -> Get ready -> analysis )—> initialization —> Use —> uninstall
1. load
- Get the binary byte stream defining this class through the full class name
- Convert the static storage structure represented by the byte stream to the runtime data structure of the method area
- Generate an in memory... That represents the class Class object , As the access to the data in the method area
2. verification
- class File format validation :class Document specification
- Metadata validation : Semantic analysis , Compliance java language norm
- Bytecode verification : Operation instruction is legal
- Symbol reference validation : Ensure that the parsing action is executed correctly
3. Get ready
Allocate memory for static variables of a class , And initialize it to the default value .
( It's not the initial value ,final Static constants decorated with keywords are directly assigned initial values , Load into the method area runtime constant pool .)
4. analysis
The process of replacing a symbolic reference in a constant pool with a direct reference .
5. initialization
Give the class the correct initial value for its static variables ,JVM Responsible for class initialization , Class variables are mainly initialized .
Initialization class triggers : new Instance object 、 Accessing static variables of a class 、 Calling static methods of a class 、 Reflection calls class 、 When subclasses need to be initialized, initialize the parent class first ( Same interface )、mian Method class .
6. uninstall
- All instance objects of this class have been GC, In other words, there is no instance object of this class in the heap .
- This class is not referenced anywhere .
- An instance of the class loader for this class has been GC.
边栏推荐
- 一锅乱炖,npm、yarn cnpm常用命令合集
- LC: string conversion integer (ATOI) + appearance sequence + longest common prefix
- What does "true" mean
- 关于cv2.dnn.readNetFromONNX(path)就报ERROR during processing node with 3 inputs and 1 outputs的解决过程【独家发布】
- Throughput
- 线性基
- 实训九 网络服务的基本配置
- PMP对工作有益吗?怎么选择靠谱平台让备考更省心省力!!!
- 干货分享|DevExpress v22.1原版帮助文档下载集合
- Matplotlib drawing 3D graphics
猜你喜欢

模拟实现string类

Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决

2022如何评估与选择低代码开发平台?

Leetcode force buckle (Sword finger offer 36-39) 36 Binary search tree and bidirectional linked list 37 Serialize binary tree 38 Arrangement of strings 39 Numbers that appear more than half of the tim

Matplotlib drawing 3D graphics

使用高斯Redis实现二级索引

Kirin Xin'an joins Ningxia commercial cipher Association

openEuler 有奖捉虫活动,来参与一下?

Ways to improve the utilization of openeuler resources 01: Introduction

Sword finger offer II 013 Sum of two-dimensional submatrix
随机推荐
关于ssh登录时卡顿30s左右的问题调试处理
强化学习-学习笔记8 | Q-learning
how to prove compiler‘s correctness
银行理财产品怎么买?需要办银行卡吗?
ASP. Net kindergarten chain management system source code
R语言使用ggplot2函数可视化需要构建泊松回归模型的计数目标变量的直方图分布并分析构建泊松回归模型的可行性
R language ggplot2 visualization: use the ggecdf function of ggpubr package to visualize the grouping experience cumulative density distribution function curve, and the linetype parameter to specify t
LeetCode_ 7_ five
what‘s the meaning of inference
R语言ggplot2可视化:使用ggpubr包的ggstripchart函数可视化分组点状条带图(dot strip plot)、设置position参数配置不同分组数据点的分离程度
Kubernetes——kubectl命令行工具用法详解
R language ggplot2 visualization: use the ggdensity function of ggpubr package to visualize the packet density graph, and use stat_ overlay_ normal_ The density function superimposes the positive dist
el-upload上传组件的动态添加;el-upload动态上传文件;el-upload区分文件是哪个组件上传的。
Specify the version of OpenCV non-standard installation
Throughput
torch.nn.functional.pad(input, pad, mode=‘constant‘, value=None)记录
[confluence] JVM memory adjustment
华南X99平台打鸡血教程
【STL】vector
pom.xml 配置文件标签:dependencies 和 dependencyManagement 区别