Mercurial > hg > truffle
comparison src/share/vm/oops/arrayOop.hpp @ 1571:2d127394260e
6916623: Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb
Summary: Added new product ObjectAlignmentInBytes flag to control object alignment.
Reviewed-by: twisti, ysr, iveresov
author | kvn |
---|---|
date | Thu, 27 May 2010 18:01:56 -0700 |
parents | 0fbdb4381b99 |
children | e9ff18c4ace7 |
comparison
equal
deleted
inserted
replaced
1570:de91a2f25c7e | 1571:2d127394260e |
---|---|
90 // Returns the header size in words aligned to the requirements of the | 90 // Returns the header size in words aligned to the requirements of the |
91 // array object type. | 91 // array object type. |
92 static int header_size(BasicType type) { | 92 static int header_size(BasicType type) { |
93 size_t typesize_in_bytes = header_size_in_bytes(); | 93 size_t typesize_in_bytes = header_size_in_bytes(); |
94 return (int)(Universe::element_type_should_be_aligned(type) | 94 return (int)(Universe::element_type_should_be_aligned(type) |
95 ? align_object_size(typesize_in_bytes/HeapWordSize) | 95 ? align_object_offset(typesize_in_bytes/HeapWordSize) |
96 : typesize_in_bytes/HeapWordSize); | 96 : typesize_in_bytes/HeapWordSize); |
97 } | 97 } |
98 | 98 |
99 // Return the maximum length of an array of BasicType. The length can passed | 99 // Return the maximum length of an array of BasicType. The length can passed |
100 // to typeArrayOop::object_size(scale, length, header_size) without causing an | 100 // to typeArrayOop::object_size(scale, length, header_size) without causing an |