当前位置:网站首页>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.
边栏推荐
- Compiler optimization (4): inductive variables
- JVM 类加载机制
- Detailed explanation of Flink parallelism and slot
- 一锅乱炖,npm、yarn cnpm常用命令合集
- R language uses ggplot2 function to visualize the histogram distribution of counting target variables that need to build Poisson regression model, and analyzes the feasibility of building Poisson regr
- Cloud 组件发展升级
- 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
- 微信公众号OAuth2.0授权登录并显示用户信息
- 华南X99平台打鸡血教程
- R language dplyr package mutate_ At function and min_ The rank function calculates the sorting sequence number value and ranking value of the specified data column in the dataframe, and assigns the ra
猜你喜欢
# 欢迎使用Markdown编辑器
RESTAPI 版本控制策略【eolink 翻译】
The strength index of specialized and new software development enterprises was released, and Kirin Xin'an was honored on the list
Kirin Xin'an joins Ningxia commercial cipher Association
openEuler 有奖捉虫活动,来参与一下?
Dynamic addition of El upload upload component; El upload dynamically uploads files; El upload distinguishes which component uploads the file.
【STL】vector
小试牛刀之NunJucks模板引擎
Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决
9 atomic operation class 18 Rohan enhancement
随机推荐
The state cyberspace Office released the measures for data exit security assessment: 100000 information provided overseas needs to be declared
IP tools
The DBSCAN function of FPC package of R language performs density clustering analysis on data, checks the clustering labels of all samples, and the table function calculates the two-dimensional contin
AD域组策略管理
torch.nn.functional.pad(input, pad, mode=‘constant‘, value=None)记录
2022如何评估与选择低代码开发平台?
how to prove compiler‘s correctness
Kirin Xin'an cloud platform is newly upgraded!
怎么在手机上买股票开户 股票开户安全吗
银行理财产品怎么买?需要办银行卡吗?
网信办公布《数据出境安全评估办法》,9 月 1 日起施行
what‘s the meaning of inference
让这个 CRMEB 单商户微信商城系统火起来,太好用了!
Simulate the implementation of string class
2022年投资哪个理财产品收益高?
mysql 的一些重要知识
吞吐量Throughout
Matplotlib drawing 3D graphics
R语言ggplot2可视化:使用ggpubr包的ggviolin函数可视化小提琴图、设置palette参数自定义不同水平小提琴图的填充色、add参数在小提琴图添加箱图
MSE API学习