In 32 bit Server,what's the size of Java.Lang.Object
Krystal Mok
rednaxelafx at gmail.com
Fri Oct 19 07:08:42 PDT 2012
Yes, Vitaly is right. That presentation described the situation in IBM's J9
VM, which is different from Oracle JDK/OpenJDK's HotSpot VM. J9 uses a
dedicated word for locks, where as HotSpot folds that into the mark word.
So an object with no explicit fields in a 32-bit HotSpot VM uses 8 bytes, 4
for the mark word and 4 for the klass pointer.
- Kris
On Fri, Oct 19, 2012 at 9:27 PM, Vitaly Davidovich <vitalyd at gmail.com>wrote:
> The presentation may be talking about IBM's VM. Hotspot obj header is two
> words; arrays have an extra int32 for length.
>
> Sent from my phone
> On Oct 19, 2012 9:15 AM, "fuyou" <fuyou001 at gmail.com> wrote:
>
>> hi all
>> I am issues about in 32 bit Server,what's the size of
>> Java.Lang.Object
>> in this blog how-much-memory-is-used-by-my-java<http://kohlerm.blogspot.com/2008/12/how-much-memory-is-used-by-my-java.html>
>> java.lang.Object: 2 * 4 (Object header),the size of Object is 2*4
>> but in the sessioCON5135_PDF_5135_0001.pdf<http://www.myexpospace.com/JavaOne2012/SessionFiles/CON5135_PDF_5135_0001.pdf> (page
>> 9) Object Metadata: 3 slots of data (4 for arrays, Class: pointer to
>> class information,Flags: shape, hash code, etc, Lock: flatlock or pointer
>> to inflated monito)
>> so the size of Object is 3*4
>>
>> who is right?
>>
>> --
>> =============================================
>>
>> fuyou001
>> Best Regards
>>
>>
>>
>> _______________________________________________
>> hotspot-gc-use mailing list
>> hotspot-gc-use at openjdk.java.net
>> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>>
>>
> _______________________________________________
> hotspot-gc-use mailing list
> hotspot-gc-use at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20121019/a3d1eb39/attachment.html
More information about the hotspot-gc-use
mailing list