Skip to content

Commit 78f97fa

Browse files
authored
[release/10.0] Redo GC heap size fix in heavily pinning scenarios (#127573)
Backport of #126043 to release/10.0 ## Customer Impact - [x] Customer reported - [ ] Found internally This change puts back the recently reverted fix for the GC heap size regression with regions when there is heavy pinning. It also fixes the issue due to which the change was recently reverted in .NET 10. The issue was in `allocate_in_condemned_generations` where a very large plug could never be relocated into a new region because front padding was always added, which could lead to an infinite loop. ## Regression - [x] Yes, introduced in .NET 10 - [ ] No ## Testing CI tests, local testing using regression test, GC perf tests ## Risk This PR restores a regions/heavy-pinning GC improvement that had already been in main/.NET 10 for an extended period and was reverted only because of one specific hang. The additional commit directly addresses that hang by fixing the near-region-sized plug relocation case in allocate_in_condemned_generations, where front padding could otherwise prevent placement and lead to an infinite loop. Since the reverted code had substantial bake time and the only known regression was this specific hang, now addressed in the same PR, the overall backport risk is low.
1 parent 0c86592 commit 78f97fa

4 files changed

Lines changed: 351 additions & 82 deletions

File tree

0 commit comments

Comments
 (0)