We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1c349f commit 491d43cCopy full SHA for 491d43c
src/hotspot/share/gc/z/zHeap.cpp
@@ -225,6 +225,14 @@ void ZHeap::mark_start() {
225
// Verification
226
ClassLoaderDataGraph::verify_claimed_marks_cleared(ClassLoaderData::_claim_strong);
227
228
+ if (ZHeap::heap()->has_alloc_stalled()) {
229
+ // If there are stalled allocations, ensure that regardless of the
230
+ // cause of the GC, we have to clear soft references, as we are just
231
+ // about to increment the sequence number, and all previous allocations
232
+ // will throw if not presented with enough memory.
233
+ ZHeap::heap()->set_soft_reference_policy(true);
234
+ }
235
+
236
// Flip address view
237
flip_to_marked();
238
0 commit comments