Often code for operating on the metadata classes such as InstanceKlass need to align to a 64-bit size. They use align_object_size() to do this, but really shouldn't since it is meant for aligning java heap objects. In fact if ObjectAlignmentInBytes is not the default of 8, it will align to something much greater than 64-bit, which is unnecessary. What is needed here is a new align macro intended for use by metadata classes that aligns specifically to 64-bits.
Also, many sizes used by the metadata are converted to "word" size. HeapWordsSize is used to do this, but shouldn't be. HeapWordSize is intended for the size of words in the java heap. wordSize should be used instead.
Also, many sizes used by the metadata are converted to "word" size. HeapWordsSize is used to do this, but shouldn't be. HeapWordSize is intended for the size of words in the java heap. wordSize should be used instead.
- relates to
-
JDK-8263906 Remove align_metadata_size()
-
- Closed
-