8318720: G1: Memory leak in G1CodeRootSet after JDK-8315503

Reviewed-by: tschatzl
This commit is contained in:
Zhengyu Gu 2023-10-25 23:47:46 +00:00
parent a542f7398d
commit 811b436e5d

@ -143,8 +143,11 @@ public:
}
void clear() {
_table.unsafe_reset();
Atomic::store(&_num_entries, (size_t)0);
// Remove all entries.
auto always_true = [] (nmethod** value) {
return true;
};
clean(always_true);
}
void iterate_at_safepoint(CodeBlobClosure* blk) {