当前位置:网站首页>Object memory layout
Object memory layout
2022-07-01 22:34:00 【Keyboard singer】
One 、 brief introduction
stay HotSpot In the virtual machine , The storage layout of objects in heap memory can be divided into three parts : Object head (Header)、 The instance data (Instance Data) And align fill (Padding). It is filled to ensure that the object is 8 Multiple of bytes !
The object head can be subdivided again , It is divided into Object tag (Mark Word) and Class meta information ( Type a pointer ), For array objects, there will be one more object header Length part . stay 64 Bit system ,Mark Word Account for the 8 Bytes , Type pointer occupied 8 Bytes , Is the total 16 Bytes .
from openJDK Of oop.hpp You can see... In the source code :_mark The fields are mark word,_metadata It's a class pointer klass pointer, Object head (object header) That is, it consists of these two fields .
Two 、 The head of the object MarkWord
Hash code can be found 、GC Mark ,GC frequency , Synchronization lock flag , Biased lock holders are Mark Word Inside .
This information is data that has nothing to do with the definition of the object itself , therefore Mar
边栏推荐
- [noip2013] building block competition [noip2018] road laying greed / difference
- [intelligent QBD risk assessment tool] Shanghai daoning brings you leanqbd introduction, trial and tutorial
- Using closures to switch toggle by clicking a button
- 为什么数字化转型战略必须包括持续测试?
- 园区全光技术选型-中篇
- CNN convolution neural network principle explanation + image recognition application (with source code) [easy to understand]
- Burpsuite simple packet capturing tutorial [easy to understand]
- 详解LockSupport的使用
- MySQL之MHA高可用配置及故障切换
- 【MySQL】索引的创建、查看和删除
猜你喜欢
随机推荐
What is the difference between PMP and NPDP?
Basic operation of binary tree
Separate the letters and numbers in the string so that the letters come first and the array comes last
RestTemplate 远程调用工具类
地图其他篇总目录
CSDN购买的课程从哪里可以进入
Fundamentals - IO intensive computing and CPU intensive computing
PHP reflective XSS, reflective XSS test and repair
Count the number of each character in the character
Basic knowledge of ngnix
首席信息官对高绩效IT团队定义的探讨和分析
园区全光技术选型-中篇
【MySQL】索引的分类
Simple interactive operation of electron learning (III)
【juc学习之路第8天】Condition
Little p weekly Vol.11
MySQL之MHA高可用配置及故障切换
Recent public ancestor offline practice (tarjan)
Why does blocprovider feel similar to provider?
【juc学习之路第9天】屏障衍生工具








