当前位置:网站首页>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
边栏推荐
猜你喜欢
MySQL之MHA高可用配置及故障切换
Do you want to make up for the suspended examination in the first half of the year? Including ten examinations for supervision engineers, architects, etc
IDA动态调试apk
函数基本学习之一
互联网的智算架构设计
园区全光技术选型-中篇
Little p weekly Vol.11
I received a letter from CTO inviting me to interview machine learning engineer
mysql 学习笔记-优化之SQL优化
【MySQL】索引的分类
随机推荐
【MySQL】explain的基本使用以及各列的作用
焱融看 | 混合云时代下,如何制定多云策略
Introduction and download of the latest version of airserver2022
Airserver mobile phone third-party screen projection computer software
linux下清理系统缓存并释放内存
mysql 学习笔记-优化之SQL优化
Basic knowledge of ngnix
多种智能指针
Training on the device with MIT | 256Kb memory
[ecological partner] Kunpeng system engineer training
"The silk road is in its youth and looks at Fujian" is in the hot collection of works in the Fujian foreign youth short video competition
函数基本学习之一
Recent public ancestor (LCA) online practices
并发编程系列之FutureTask源码学习笔记
PyTorch磨刀篇|argmax和argmin函数
【单体】流辰信息I-BPSv3服务器推荐配置
awoo‘s Favorite Problem(优先队列)
Smart micro mm32 multi-channel adc-dma configuration
Mysql——》Innodb存储引擎的索引
List announced | outstanding intellectual property service team in China in 2021