to be blunt, this doesn't sound right to me, unless it's doing something
rather more clever to manage the memory.
i mocked up a simple class containing a byte[], ByteBuffer and long, and
the shallow size alone is 32 bytes. deep size with a byte[16], 1-byte
bytebuffer and long is 132. this is a on a 64-bit jvm on win x64, but
is consistent(ish) with what i've seen in the past on linux jvms. the
actual code has rather more objects than this (it's a map, it has a
pair, decoratedKey) so would be quite a bit bigger per key.
On 17/12/2011 03:42, Brandon Williams wrote:
On Fri, Dec 16, 2011 at 9:31 PM, Dave Brosius<dbros...@mebigfatguy.com> wrote:
Wow, Java is a lot better than I thought if it can perform that kind of
magic. I'm guessing the wiki information is just old and out of date. It's
probably more like 60 + sizeof(key)
With jamm and MAT it's fairly easy to test. The number is accurate
last I checked.
-Brandon