mirror of
https://github.com/openjdk/jdk.git
synced 2026-06-15 06:52:26 +00:00
fix: Assert retained region stays a partition member to catch staleness
This commit is contained in:
parent
ca0c2ffa27
commit
328e8d6989
@ -55,8 +55,9 @@ HeapWord* ShenandoahPartitionAllocator<PARTITION>::allocate(ShenandoahAllocReque
|
||||
if (_retained_region != nullptr) {
|
||||
constexpr ShenandoahAffiliation affiliation =
|
||||
(PARTITION == ShenandoahFreeSetPartitionId::OldCollector) ? OLD_GENERATION : YOUNG_GENERATION;
|
||||
assert(!_retained_region->is_trash() && _retained_region->affiliation() == affiliation,
|
||||
"Retained region %zu must stay affiliated to this partition until the free set is rebuilt",
|
||||
assert(!_retained_region->is_trash() && _retained_region->affiliation() == affiliation &&
|
||||
_free_set->membership(_retained_region->index()) == PARTITION,
|
||||
"Retained region %zu must remain a non-trash member of this partition until the free set is rebuilt",
|
||||
_retained_region->index());
|
||||
HeapWord* result = nullptr;
|
||||
size_t ac_words = _retained_region->free() >> LogHeapWordSize;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user