8303824: Parallel: Use more strict card table API

Reviewed-by: tschatzl, iwalulya, ysr
This commit is contained in:
Albert Mingkun Yang 2023-03-13 11:30:52 +00:00
parent 8e41bf222f
commit 4cf4c599b9
2 changed files with 8 additions and 3 deletions

View File

@ -103,6 +103,11 @@ class PSOldGen : public CHeapObj<mtGC> {
(HeapWord*)(_virtual_space->high_boundary()));
}
MemRegion committed() const {
return MemRegion((HeapWord*)(_virtual_space->low()),
(HeapWord*)(_virtual_space->high()));
}
size_t max_gen_size() const { return _max_gen_size; }
size_t min_gen_size() const { return _min_gen_size; }

View File

@ -1017,11 +1017,11 @@ void PSParallelCompact::post_compact()
to_space->is_empty();
PSCardTable* ct = heap->card_table();
MemRegion old_mr = heap->old_gen()->reserved();
MemRegion old_mr = heap->old_gen()->committed();
if (young_gen_empty) {
ct->clear(old_mr);
ct->clear_MemRegion(old_mr);
} else {
ct->invalidate(old_mr);
ct->dirty_MemRegion(old_mr);
}
// Delete metaspaces for unloaded class loaders and clean up loader_data graph