Skip to content

Commit fc2bde4

Browse files
authored
Fix issue with last_gc_before_oom flag being reset by intervening gen 1 GC. (#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 320528e commit fc2bde4

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
@@ -21785,7 +21785,7 @@ void gc_heap::gc1()
2178521785
#endif //BACKGROUND_GC
2178621786
#endif //MULTIPLE_HEAPS
2178721787
#ifdef USE_REGIONS
21788-
if (!(settings.concurrent))
21788+
if (!(settings.concurrent) && (settings.condemned_generation == max_generation))
2178921789
{
2179021790
last_gc_before_oom = FALSE;
2179121791
}

0 commit comments

Comments
 (0)