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

Dawid Weiss dawid.weiss at
Wed Mar 14 01:30:14 PDT 2012

Hi everyone,

This has been asked on Apache Lucene JIRA and I admit I don't know the answer:

Is there a way to detect the reference size (which boils down to
compact vs. full reference on 64 bit machines) from within Java?

I assume the VM starts without an agent so Instrumentation is not
available. I'd appreciate a comment if somebody knows right away (even
if it's a: "no"), otherwise I'll go through the sources and try to
figure it out on my own.


More information about the hotspot-compiler-dev mailing list