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

G1: Clean up usages of heap_region_containing

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • gc
    • b12
    • other, unknown

        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.

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

                Created:
                Updated:
                Resolved: