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

ZGC: Reduce width of zForwardingEntry::from_index field

    Details

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

      Description

      The zForwardingEntry::from_index field only needs 18 bits, as it only needs to be able to represent the largest object index, which is:

      ZPageSizeSmall / MinObjectAlignment == 2M / 8 == 262144 == 1 << 18.

      Shrinking the from_index allows us to grow the to_offset, which in turn allows us to increase the max heap size in the future. However, with these changes, we can no longer assume that (uint64_t)-1 is an empty entry. So we need to introduce a new flag to indicate if an entry is populated or not.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pliden Per Liden
                Reporter:
                pliden Per Liden
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: