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

Sort the freelist in order to shrink the heap

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u20, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b08

      Backports

        Description

        The G1 heap can currently only shrink from the top down. In applications that allocates lots of large objects this can become a problem since G1 does not move large objects. If a large object happens to be allocated near the top of the heap, G1 will not be able to shrink the heap even if there is plenty of free space below the large object.

        Old regions that G1 gives a low priority to collect will also stop the heap from shrinking in a similar manner. As long as there are old regions near the top of the heap, G1 can not shrink the heap.

        One way to lower the risk of allocating large objects and old regions near the top of the heap is to sort the free list and make sure that we always try to claim these regions near the bottom of the heap.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jwilhelm Jesper Wilhelmsson
                Reporter:
                jwilhelm Jesper Wilhelmsson
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: