Improve region free list handling (#56314)
authorPeter Sollich <petersol@microsoft.com>
Fri, 6 Aug 2021 11:14:25 +0000 (13:14 +0200)
committerGitHub <noreply@github.com>
Fri, 6 Aug 2021 11:14:25 +0000 (13:14 +0200)
commite0ac79887882840b784e2b32daa084f7f01d921e
tree2ec0949bc9298b51134b36f8823484be65a157c4
parent5f417142b0b90da0d1d75c21a583cf8d9e54c4d6
Improve region free list handling (#56314)

The main ideas are:
- Move free regions exceeding ephemeral / UOH budgets to a list of regions to be decommited.
 - In SVR GC, distribute the remaining free regions evenly across heaps.
 - Decommit extra free regions right away (in WKS) or gradually on a GC thread (in SVR).
 - Put free regions exceeding the standard size for UOH on a global list for "free huge regions".
 - When we have choice which regions to decommit, we pick the ones with the highest addresses to reduce address space fragmentation.
src/coreclr/gc/gc.cpp
src/coreclr/gc/gcpriv.h