Skip to content

Commit 14b3b2d

Browse files
authored
Merge pull request #22802 from tajila/user
(0.56) Free monitorEnterRecordPool in freecontinuation
2 parents 3ac3ef5 + 8e2a78a commit 14b3b2d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

runtime/vm/ContinuationHelpers.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ freeContinuation(J9VMThread *currentThread, j9object_t continuationObject, BOOLE
380380
/* Remove reverse link to vthread object. */
381381
continuation->vthread = NULL;
382382

383+
pool_kill(continuation->monitorEnterRecordPool);
384+
continuation->monitorEnterRecordPool = NULL;
385+
383386
if (NULL != continuation->objectWaitMonitor) {
384387
bool errorNone = VM_ContinuationHelpers::removeBlockingContinuationFromLists(currentThread, continuation);
385388
Assert_VM_true(errorNone);
@@ -451,11 +454,6 @@ recycleContinuation(J9JavaVM *vm, J9VMThread *vmThread, J9VMContinuation* contin
451454
vm->cacheFree += 1;
452455
/* Caching failed, free the J9VMContinuation struct. */
453456
freeJavaStack(vm, continuation->stackObject);
454-
#if JAVA_SPEC_VERSION >= 24
455-
if (J9_ARE_ANY_BITS_SET(vm->extendedRuntimeFlags3, J9_EXTENDED_RUNTIME3_YIELD_PINNED_CONTINUATION)) {
456-
pool_kill(continuation->monitorEnterRecordPool);
457-
}
458-
#endif /* JAVA_SPEC_VERSION >= 24 */
459457
j9mem_free_memory(continuation);
460458
}
461459
}

0 commit comments

Comments
 (0)