当前位置:网站首页>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
边栏推荐
- Which securities company should we choose to open an account for flush stock? Is it safe to open an account with a mobile phone?
- Tops, the unit of computing power of the processor, can be carried out 1 trillion times per second
- Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
- Why must digital transformation strategies include continuous testing?
- ICML2022 | 基于元语义正则化的介入性对比学习
- [STM32] stm32cubemx tutorial II - basic use (new projects light up LED lights)
- What is the difference between PMP and NPDP?
- 业务可视化-让你的流程图'Run'起来
- 焱融看 | 混合云时代下,如何制定多云策略
- [NOIP2013]积木大赛 [NOIP2018]道路铺设 贪心/差分
猜你喜欢
[deep learning] use deep learning to monitor your girlfriend's wechat chat?
Redis配置与优化
One of the basic learning of function
固定资产管理子系统报表分为什么大类,包括哪些科目
[NOIP2013]积木大赛 [NOIP2018]道路铺设 贪心/差分
Significance and measures of security encryption of industrial control equipment
linux下清理系统缓存并释放内存
焱融看 | 混合云时代下,如何制定多云策略
多种智能指针
Flume interview questions
随机推荐
Relationship and difference between enterprise architecture and project management
100年仅6款产品获批,疫苗竞争背后的“佐剂”江湖
Significance and measures of security encryption of industrial control equipment
AIDL基本使用
MySQL empties table data
Burpsuite simple packet capturing tutorial [easy to understand]
Mysql——》Innodb存储引擎的索引
固定资产管理子系统报表分为什么大类,包括哪些科目
The leader of the cloud native theme group of beacon Committee has a long way to go!
MQ learning notes
并发编程系列之FutureTask源码学习笔记
二叉树的基本操作
[commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial
Sonic云真机学习总结6 - 1.4.1服务端、agent端部署
A debugging to understand the slot mechanism of redis cluster
【MySQL】数据库优化方法
【目标跟踪】|单目标跟踪指标
Basic knowledge of ngnix
Mask wearing detection method based on yolov5
Interview question: what is the difference between MySQL's Union all and union, and how many join methods MySQL has (Alibaba interview question) [easy to understand]