Skip to content

Commit 51608e3

Browse files
PeterSolMSmangod9
authored andcommitted
Fix issue with last_gc_before_oom flag being reset by intervening gen 1 GC. (dotnet#78973)
This is a refinement suggested by Maoni for earlier PR#77478 - the last_gc_before_oom flag should also not be reset by an intervening gen 1 GC. This was noticed by Maoni due to a customer issue with spurious OOM exceptions with .NET Core 7.
1 parent b57ee3c commit 51608e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coreclr/gc/gc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21711,7 +21711,7 @@ void gc_heap::gc1()
2171121711
#endif //BACKGROUND_GC
2171221712
#endif //MULTIPLE_HEAPS
2171321713
#ifdef USE_REGIONS
21714-
if (!(settings.concurrent))
21714+
if (!(settings.concurrent) && (settings.condemned_generation == max_generation))
2171521715
{
2171621716
last_gc_before_oom = FALSE;
2171721717
}

0 commit comments

Comments
 (0)