Improve memory usage for cards in SparsePRTEntry

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • gc
    • b120

      The current implementation of the G1 sparse remembered sets we use CardIdx_t as elements for SparsePRTEntrys, which are ints, while card offsets within a region can only range [0, 0xffff], since regions are capped at 32 MB.

      The reason for this is that -1 is used to represent null value entries in SparsePRTEntry.
      A key observation is that all the null entries are at the end of the array in SparsePRTEntry,
      which means that adding an integer field _next_null, will be sufficient to keep track of the null entries.

      This also means that clearing an array can be made faster, since it just involves setting this integer.

            Assignee:
            Thomas Schatzl
            Reporter:
            Andreas Sjöberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: