Gary W. Lucas wrote:
So, the JVM uses the following per object
8 bytes management (including object-synchronization overhead)
There are all sorts of things to fit into those eight bytes. Your object will require creation time (used to prioritise garbage collection), original memory location (used for identity hash code/Object#hashCode), location of its pointer in memory (used if object has to be moved in memory during garbage collection), etc. Come to think of it, those three things alone will occupy sixteen bytes on a 32‑bit machine.
Siegfried Heintze wrote:. . . Wow! 8 bytes seems like a lot to me . . .
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton