java.lang.instrument.Instrumentation.getObjectSize for java.lang.Class instance

Peter Levart peter.levart at gmail.com
Fri Dec 14 10:18:24 PST 2012


Hi,

Does anybody know what the size returned by 
java.lang.instrument.Instrumentation.getObjectSize when passed a Class 
instance actually means? It is different for various Class instances 
(contains static fields of various classes?). It's also quite big (520 
bytes for Object.class on 64bit JVM without compressed OOPS). If I 
remove some instance fields from java.lang.Class the reported size stays 
the same.

Regards, Peter



More information about the hotspot-runtime-dev mailing list