Mercurial > hg > graal-jvmci-8
diff src/share/vm/oops/arrayOop.hpp @ 165:437d03ea40b1
6703888: Compressed Oops: use the 32-bits gap after klass in a object
Summary: Use the gap also for a narrow oop field and a boxing object value.
Reviewed-by: coleenp, never
author | kvn |
---|---|
date | Wed, 21 May 2008 16:31:35 -0700 |
parents | ba764ed4b6f2 |
children | d1605aabd0a1 |
line wrap: on
line diff
--- a/src/share/vm/oops/arrayOop.hpp Wed May 21 13:46:23 2008 -0700 +++ b/src/share/vm/oops/arrayOop.hpp Wed May 21 16:31:35 2008 -0700 @@ -41,11 +41,10 @@ // Header size computation. // The header is considered the oop part of this type plus the length. // Returns the aligned header_size_in_bytes. This is not equivalent to - // sizeof(arrayOopDesc) which should not appear in the code, except here. + // sizeof(arrayOopDesc) which should not appear in the code. static int header_size_in_bytes() { - size_t hs = UseCompressedOops ? - sizeof(arrayOopDesc) : - align_size_up(sizeof(arrayOopDesc) + sizeof(int), HeapWordSize); + size_t hs = align_size_up(length_offset_in_bytes() + sizeof(int), + HeapWordSize); #ifdef ASSERT // make sure it isn't called before UseCompressedOops is initialized. static size_t arrayoopdesc_hs = 0;