G1CollectedHeap::expand() returns the wrong value

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 18
    • Affects Version/s: 18
    • Component/s: hotspot
    • gc
    • b22

      G1CollectedHeap::expand() returns

        regions_to_expand > 0

      which is true if we wanted to expand; the correct value would be

        expanded_by > 0;

      to return if the heap has actually been expanded.

      There is no particular impact on this except for some (minimal) extra work done.

      Found by Jonathan Joo (http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2021-October/037149.html)

            Assignee:
            Man Cao
            Reporter:
            Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: