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

G1: Fix incorrect uses of HeapRegionManager::max_length

    XMLWordPrintable

Details

    • gc
    • b17

    Description

      Since the implementation of JDK-8171181 JEP 316: Heap Allocation on Alternative Memory Devices there are two notions of maximum number of regions in the heap in HeapRegionManager:

      max_length(): maximum number of regions in the entire reserved area of the heap (to be used for sizing for arrays etc.)
      max_expandable_length(): maximum number of regions g1 is allowed to commit.

      There are some wrong uses of both. This is not an issue for regular G1 as both are the same, but a problem when having a larger reserved space than committable (e.g. with that feature enabled).

      There are also some missing bounds checks in the code assuming max_length == max_expandable_length.

      Fix this (and users of HeapRegionManager::max_length/max_expandable_length)

      Attachments

        Issue Links

          Activity

            People

              tschatzl Thomas Schatzl
              tschatzl Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: