当前位置:网站首页>Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it
Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it
2022-07-28 14:28:00 【InfoQ】
01 JVM Memory structure
- Program counter
- Java Virtual machine stack
- Native Method Stack
- Pile up
- Method area

1.1 Program counter (PC register )
- Bytecode interpreter reads instructions in turn by changing program counter , So as to realize the flow control of the code .
- In the case of multithreading , The program counter records the current thread execution position , Thus, when the thread switches back to when , I know where the thread last executed .
- Thread private , Each thread has its own program counter .
- Life cycle : Created with the creation of threads , Destroy as the thread ends .
- It's the only one that won't show up OutOfMemoryError The memory area of .
1.2 Java Virtual machine stack (Java Stack )
- Local variable table
- The stack of operands
- Dynamic links
- Method exit information
- ......

- The local variable table is created as the stack frame is created , Its size is determined at compile time , Just allocate things when creating You can specify the size first . During method operation , The size of the local variable table does not change .
- Java There are two exceptions to the virtual machine stack :StackOverFlowError and OutOfMemoryError.
- StackOverFlowError if Java The size of the virtual machine stack does not allow dynamic expansion , Then when the thread please The depth of the stack exceeds the current Java The maximum depth of the virtual machine stack , Throw out StackOverFlowError abnormal .

02 HotSpot Exploring virtual machine objects
2.1 Memory layout of objects stay HotSpot In the virtual machine , The memory layout of the object is divided into the following 3 area :
- Object head (Header)
- The instance data (Instance Data)
- Alignment filling (Padding)

- Hash code
- GC Generational age
- Lock status flag
- A lock held by a thread
- To the thread ID
- Bias timestamp

03 Garbage collection strategy and algorithm
3.1 Determine whether the object is alive
- Java Virtual machine stack ( Local variables in stack frames ) Object referenced in
- Objects referenced in the local method stack
- The object referenced by a constant in the method area
- Object referenced by a class static property in a method area

04 HotSpot Garbage collector
4.1 A new generation of garbage collectors



05 Memory allocation and recycling strategy

06 JVM performance tuning
- adopt 64 position JDK To use large memory ;
- Use several 32 Bit virtual machines build logical clusters to utilize hardware resources .

07 Class file structure

08 Class load time

09 The process of class loading

10 Class loader
10.1 Class and class loader

边栏推荐
- The default storage engine after MySQL 5.5 is InnoDB.
- What is a spin lock? A spin lock means that when a thread attempts to acquire a lock, if the lock has been occupied by other threads, it will always cycle to detect whether the lock has been released,
- Mobile phone scrolling screenshot software recommendation
- 2022 melting welding and thermal cutting examination questions and online simulation examination
- MVC model: calendar system
- 这3款在线PS工具,得试试
- @DS('slave') 多数据源兼容事务问题解决方案
- Minitest -- applet automation testing framework
- LeetCode 0142.环形链表 II
- MeterSphere--开源持续测试平台
猜你喜欢

IP black and white list

这3款在线PS工具,得试试
![[ecmascript6] other new interface features](/img/da/377f93d83b6722bf250d270e4eea28.png)
[ecmascript6] other new interface features

2022 high altitude installation, maintenance, removal of examination question bank and online simulated examination

Cv:: mat conversion to qimage error

树莓派基础 | 总结记录树莓派学习过程中的一些操作

UFIDA BiP CRM new product launch enables large and medium-sized enterprises to grow their marketing

83. (cesium home) how the cesium example works

Thesis study -- masked generative disintegration

When Xcode writes swiftui code, it is a small trap that compiles successfully but causes the preview to crash
随机推荐
[translation] salt companies come to linkerd for load balancing, and stay for efficiency, reliability and performance
数据库优化 理解这些就够了
Redis sentinel mechanism
Solve the problem that uniapp wechat applet canvas cannot introduce fonts
JMeter installation tutorial and login add token
[ecmascript6] set and map
Langjing Technology (Trax China) "robot +ai" opens the era of Chinese retail meta universe
Forage QR code -- online QR code generator
2022 low voltage electrician examination questions and answers
Thoughts on the construction of some enterprise data platforms
LeetCode 0143. 重排链表
Clickhouse distributed cluster construction
2022年安全员-A证操作证考试题库模拟考试平台操作
八、picker用法 下拉框选择效果
Detailed explanation of C language student achievement management system [easy to understand]
What is gossip (E-Net gossip)
[leetcode] 1331. Array sequence number conversion
Floating point data type in C language (did you learn to waste it)
TDengine 助力西门子轻量级数字化解决方案
利用反射构建一棵菜单生成树