How to detect if the VM is running with compact refs from within the VM (no agent)?

John Rose john.r.rose at
Wed Mar 14 10:53:37 PDT 2012

On Mar 14, 2012, at 1:41 AM, Krystal Mok wrote:

> I'm not aware of any way to get the exact "reference size" (or "oop size" in HotSpot's terms). But it's possible to know whether compressed oops is in use or not. 

For some platforms, you could inspect sun.misc.Unsafe.ARRAY_OBJECT_INDEX_SCALE (= oopSize) and ADDRESS_SIZE (= wordSize).

— John
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-compiler-dev mailing list