< prev index next >

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

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