>So: can anyone tell me how much memory overhead hotspot adds for each object
>created under Linux JVM? If it is not constant value I'd appreciate even a
>ballpark figure.
Lots of info on this here:
http://www.javaworld.com/javaworld/jw-11-1999/jw-11-performance.html
I know from experience that JDK 1.1 for Linux each Object has 26 bytes
of overhead. And remember that arrays are objects and characters are 2
bytes. Strings end up being at least 52 + 2*n bytes long!
The article claims HotSpot JDK 1.2 is 18 bytes/Object.
However, even with these numbers my estimate for the program I was
worried about (which had a big Hashtable of Strings -> Objects) was 5x
lower than actual memory consumption. Hashtable overhead may be some
of it.
[EMAIL PROTECTED]
. . . . . . . . http://www.media.mit.edu/~nelson/
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]