From Compressed OOPs to Compact Headers: JVM Internals Explained Clearly
Java 25 introduces a fundamental change to the memory layout of objects: Compact Object Headers. In this talk, you'll learn – supported by numerous illustrations – what this feature is all about.
We'll use Compact Object Headers as a starting point to explore the world of object headers, object pointers, and class pointers: What exactly are OOPs (ordinary object pointers), and how do compressed OOPs work on 64-bit systems? How are traditional 128-bit object headers structured – and how can they be reduced to 96 or even 64 bits?
You'll discover what the Mark Word is, how it's structured, what role it plays in locking – and how that relates to the pinning of Virtual Threads. We'll take a look at the evolution from legacy locking to lightweight locking – and how this progression paved the way for header reduction through Project Lilliput.
And last but not least, you’ll find out why smaller objects not only save memory, but can also significantly boost your application’s performance.
This talk is for developers who not only work with Java, but also want to understand the JVM mechanisms under the hood.
online
English