Skip to content

Commit 3f5a860

Browse files
authored
Merge pull request #24413 from LinHu2016/pmr_committedsizeisssue
Prevent Eden from exceeding free heap after a heap resize failure
2 parents fca7001 + 6e5c0be commit 3f5a860

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

runtime/gc_vlhgc/MemorySubSpaceTarok.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,9 @@ MM_MemorySubSpaceTarok::performResize(MM_EnvironmentBase *env, MM_AllocateDescri
942942
resizeAmount = -(intptr_t)performContract(env, allocDescription);
943943
} else if (_expansionSize != 0) {
944944
resizeAmount = performExpand(env);
945-
} else {
945+
}
946+
947+
if (0 == resizeAmount) {
946948
/**
947949
* In case there is no heap resize, check if there is the case that free size is smaller than eden size
948950
* due to the conflict between eden resize and heap resize, recalculateEdenSize if it happens.

0 commit comments

Comments
 (0)