< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Instance.java

Print this page
@@ -53,10 +53,13 @@
      super(handle, heap);
    }
  
    // Returns header size in bytes.
    public static long getHeaderSize() {
+     if (VM.getVM().isCompactObjectHeadersEnabled()) {
+       return Oop.getHeaderSize();
+     }
      if (VM.getVM().isCompressedKlassPointersEnabled()) {
        return typeSize - VM.getVM().getIntSize();
      } else {
        return typeSize;
      }
< prev index next >