Java 25 introduces JEP 519, which makes Compact Object Headers a production feature in HotSpot JVM. This reduces object header size from 96-128 bits to 64 bits on 64-bit platforms by merging the mark word and class pointer. The change delivers 10-20% memory reduction for applications with many small objects, improves cache utilization, and reduces garbage collection pressure. Benchmarks show 22% heap space reduction and 15% fewer GC cycles in SPECjbb2015 tests. The feature requires compressed class pointers and is not yet supported by JVMCI on x64.
Table of contents
1. Introduction2. Compact Object Headers3. Technical Implementations for Reducing Object Header Size4. Activation and Benefits5. Risks and Testing6. Benchmark Results of Custom Object Headers7. ConclusionSort: