Skip to content

Commit

Permalink
Fix issue with spurious unproductive full GC which led to OOM. (#77478)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PeterSolMS authored Oct 28, 2022
1 parent 68cf247 commit cac1b59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21764,7 +21764,10 @@ void gc_heap::gc1()
#endif //BACKGROUND_GC
#endif //MULTIPLE_HEAPS
#ifdef USE_REGIONS
last_gc_before_oom = FALSE;
if (!(settings.concurrent))
{
last_gc_before_oom = FALSE;
}
#endif //USE_REGIONS
}

Expand Down

0 comments on commit cac1b59

Please # to comment.