G1 archive region deallocation may shrink the heap below -Xms

XMLWordPrintable

    • Type: Bug
    • Resolution: Withdrawn
    • Priority: P4
    • 21
    • Affects Version/s: 14
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: