4 ms·
Is this saying every Java object (struct?) has 16 bytes of storage overhead? Does that apply to arrays of objects too?
by jenny91 5y ago
Is this saying every Java object (struct?) has 16 bytes of storage overhead? Does that apply to arrays of objects too?
- deleted 5y ago[deleted]
- djur 5y agoYes, in 64-bit HotSpot every object has a 16-byte header, and it applies to arrays if by that you mean that each object in an array still has a header. There's a good overview of what that space is used for here: https://wiki.openjdk.java.net/display/lilliput/Main https://wiki.openjdk.java.net/display/lilliput/Main