New candidate JEP: 519: Compact Object Headers
Alex Buckley
alex.buckley at oracle.com
Tue May 13 23:32:46 UTC 2025
On 5/13/2025 4:06 PM, David Alayachew wrote:
> Silly question -- what happens if you use this feature, but end up with
> more classes than can fit in the class' object header? I like to think
> of myself as aware of my project's performance metrics, but the number
> of classes loaded is not a detail I track.
Not silly -- considered in the prior JEP -- see "Compressed class
pointers encoding" in https://openjdk.org/jeps/450#Risks-and-Assumptions
The abstract JVM has no limit to the number of loaded classes (see JVMS
4.11 for things that do have limits). Maybe Roman can say how much
stress testing has been performed with the HotSpot implementation to
discover the practical limit to the number.
Alex
More information about the jdk-dev
mailing list