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

G1 archive region deallocation may shrink the heap below -Xms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Withdrawn
    • Icon: P4 P4
    • 21
    • 14
    • hotspot
    • gc

      When an archive region is deallocated (e.g. if we did not manage to map in or find an archive), the G1CollectedHeap::dealloc_archive_regions() method shrinks the heap (i.e. uncommits the region) unconditionally.

      This is wrong in case this would decrease the allocated heap below -Xms.

      Particularly noticeable with -Xms == -Xmx and running with gc+region=trace debugging: at the beginning G1 allocates a region as closed archive, but then *uncommits* it.

      This may cause really minor performance hiccups/regressions, but often G1 re-commits that region later anyway.

      Afaict this is a bug introduced with the initial archive regions support.

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

              Created:
              Updated:
              Resolved: