Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
haneefmubarak
· 10y ago · 0 comments
So... Why exactly does it need 24 bytes if a long is only 8 bytes (64 bits)?
Comments
[–]
kaushiks
10y ago
For the 16 byte (on x86_64) header (markOop, klass *).
[–]
jcdavis
10y ago
The header is only 12 bytes with compressedOops (which most people use), but the long is aligned on an 8 byte boundary so the advantage is wasted here.
[–]
alblue
10y ago
And even if the long wasn't on an aligned boundary, the object itself is. So you either have padding at the start or end of the object.