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

G1: Clean up usages of heap_region_containing

    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:
      b12
    • CPU:
      other, unknown

      Backports

        Description

        Before the perm gen was removed G1CollectedHeap::heap_region_containing() could return NULL for addresses in the perm gen. This means that a lot of code had to check the result since it could potentially be NULL.

        Now the only reason to return NULL is if the address passed in NULL. In many places it is possible to know that the address is not NULL and in the other places it is just as simple to check the address for NULL before calling G1CollectedHeap::heap_region_containing() rather than checking for NULL after having called it.

        So, to simplify the code a bit we can assert that G1CollectedHeap::heap_region_containing() never returns NULL and then only check before we call it in the places where we would otherwise have passed NULL to it.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                brutisso Bengt Rutisson (Inactive)
                Reporter:
                brutisso Bengt Rutisson (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: