On Mon, 1 Dec 2025 22:48:05 GMT, Coleen Phillimore <[email protected]> wrote:
>> src/hotspot/share/oops/instanceKlass.hpp line 237: >> >>> 235: >>> 236: // State is set either at parse time or while executing, atomically >>> to not disturb other state >>> 237: InstanceKlassFlags _misc_flags; >> >> It looks like the size of these 3 fields, _reference_type, _access_flags, >> and _misc_flags, will take 8 bytes because of alignment/padding, but if >> _reference_type was moved to the end of InstanceKlassFlags and the order >> reversed, it could be reduced to 6 bytes, leaving 2 for future expansion: >> >> InstanceKlassFlags _misc_flags; // contains _reference_type >> AccessFlags _access_flags; >> char _reserved[2]; > > ClassState is a u1 so that fills the u2 gap with reference_type. So I don't > think moving reference type will help. You're right, I missed that. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28371#discussion_r2579576187
