Skip to content

Commit cac1b59

Browse files
authored
Fix issue with spurious unproductive full GC which led to OOM. (#77478)
Problem was that a BGC was in progress when the full GC was requested by setting the last_gc_before_oom flag, and at the end of the BGC we turned off the last_gc_before_oom flag. Fix is simply not to turn off the flag in the case of BGC.
1 parent 68cf247 commit cac1b59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/coreclr/gc/gc.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21764,7 +21764,10 @@ void gc_heap::gc1()
2176421764
#endif //BACKGROUND_GC
2176521765
#endif //MULTIPLE_HEAPS
2176621766
#ifdef USE_REGIONS
21767-
last_gc_before_oom = FALSE;
21767+
if (!(settings.concurrent))
21768+
{
21769+
last_gc_before_oom = FALSE;
21770+
}
2176821771
#endif //USE_REGIONS
2176921772
}
2177021773

0 commit comments

Comments
 (0)