Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8145628

hotspot metadata classes shouldn't use HeapWordSize or heap related macros like align_object_size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • b107

      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.

            coleenp Coleen Phillimore
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: