From: Vladimir Sadov Date: Tue, 21 Apr 2020 17:13:52 +0000 (-0700) Subject: [GC] Fix the bounds of desired size equalization loop . (#35226) X-Git-Tag: submit/tizen/20210909.063632~8467 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f66207384a3081f7184c2375edf9bac823002271;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [GC] Fix the bounds of desired size equalization loop . (#35226) * Fix the bounds of desired size equalization loop . * Use <= in the right place. --- diff --git a/src/coreclr/src/gc/gc.cpp b/src/coreclr/src/gc/gc.cpp index 3e3096e604e..f7c11b7da9f 100644 --- a/src/coreclr/src/gc/gc.cpp +++ b/src/coreclr/src/gc/gc.cpp @@ -16291,9 +16291,9 @@ void gc_heap::gc1() int limit = settings.condemned_generation; if (limit == max_generation) { - limit = total_generation_count; + limit = total_generation_count-1; } - for (int gen = 0; gen < limit; gen++) + for (int gen = 0; gen <= limit; gen++) { size_t total_desired = 0;