From 4a00d738bbbbb122d26acbce722b3f6c148d8860 Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Wed, 5 Jan 2022 11:38:31 -0800 Subject: [PATCH] Avoiding Bimodal GC behavior --- src/coreclr/gc/gc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index ace66eac266709..19bc249834576e 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -19699,7 +19699,9 @@ int gc_heap::generation_to_condemn (int n_initial, if (dt_low_ephemeral_space_p (check_only_p ? tuning_deciding_full_gc : - tuning_deciding_condemned_gen)) + tuning_deciding_condemned_gen) && + (generation_free_list_space (generation_of (0)) < 1000000) + ) { low_ephemeral_space = TRUE;