Skip to content

Commit 51d51c1

Browse files
authored
First version - just make sure all heaps sweep rather than compact if special_sweep_p is set by one heap. (#69177)
The issue was that in SVR GC, some GC threads would not be able to obtain a region for gen 0, and thus set special_sweep_p, but later on, this setting would be ignored when GC threads voted whether to sweep or compact. So we ended up compacting anyway, not getting a gen 0 region for some heaps, and verify_regions failing. Fix is simply to always do sweep when special_sweep_p is set. This still doesn't make ASP.NET work with tight hard limits - more work is needed.
1 parent 2fe067d commit 51d51c1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/coreclr/gc/gc.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29428,6 +29428,13 @@ void gc_heap::plan_phase (int condemned_gen_number)
2942829428

2942929429
for (i = 0; i < n_heaps; i++)
2943029430
{
29431+
#ifdef USE_REGIONS
29432+
if (special_sweep_p)
29433+
{
29434+
g_heaps[i]->gc_policy = policy_sweep;
29435+
}
29436+
else
29437+
#endif //USE_REGIONS
2943129438
if (pol_max > g_heaps[i]->gc_policy)
2943229439
g_heaps[i]->gc_policy = pol_max;
2943329440
#ifndef USE_REGIONS

0 commit comments

Comments
 (0)