Shenandoah: use free set available to calculate soft mutator available

XMLWordPrintable

    • gc

      In JDK-8372543, we use soft max heap size to calculate available space on the heap: `available(ShenandoahHeap::heap()->soft_max_capacity() * (100.0 - ShenandoahEvacReserve) / 100)`[1], the `available` function is essentially `capacity - used`[2]. However, in reality there are some waste (e.g.: small margin in a region that's not enough to allocate). Use freeset available would be closer to what's actually "available".


      [1]: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp#L429-L432
      [2]: https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp#L434-L438

            Assignee:
            Rui Li
            Reporter:
            Rui Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: