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

Improve memory usage for cards in SparsePRTEntry

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b120

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: