RFR: 8348400: GenShen: assert(ShenandoahHeap::heap()->is_full_gc_in_progress() || (used_regions_size() <= _max_capacity)) failed: Cannot use more than capacity #

William Kemper wkemper at openjdk.org
Tue Mar 11 19:59:29 UTC 2025


Shenandoah cannot recycle immediate trash regions during the concurrent weak roots phase, however some of these regions may be assigned to the old generation collector's reserve. When an evacuation/promotion tries to allocate in such a region, it will fail (as expected) and try to 'steal' a region from the mutator's partition of the free set.  There are cases when this cannot be allowed due to capacity constraints. However, in some of these cases it will be possible to 'swap' a region between the old reserve and the mutator's partition. This change covers this case.

-------------

Commit messages:
 - Do not enforce size constraints on generations
 - Don't allocate in regions that cannot be flipped to old gc
 - Do not allocate from mutator if young gen cannot spare the region

Changes: https://git.openjdk.org/jdk/pull/23998/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23998&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8348400
  Stats: 66 lines in 3 files changed: 42 ins; 13 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/23998.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23998/head:pull/23998

PR: https://git.openjdk.org/jdk/pull/23998


More information about the shenandoah-dev mailing list