Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Sollich <petersol@microsoft.com>2022-09-30 02:27:21 +0300
committerGitHub <noreply@github.com>2022-09-30 02:27:21 +0300
commit43fa22f07449f24f6959b959e49c69aff91a8a14 (patch)
tree902fff46c4b743805e32ff3432b46500372e3cc2 /src
parent8ff1bd04dfce1ca7e80401053b8983e22798a29d (diff)
Disable gen 1 budget accounting fix for segments, so the segments implementation of GC behaves like .NET 6.0 did. (#76365)
Diffstat (limited to 'src')
-rw-r--r--src/coreclr/gc/gc.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp
index e04b77284d8..adccf6dd483 100644
--- a/src/coreclr/gc/gc.cpp
+++ b/src/coreclr/gc/gc.cpp
@@ -21467,7 +21467,14 @@ void gc_heap::gc1()
dynamic_data* dd = hp->dynamic_data_of (gen);
dd_desired_allocation (dd) = desired_per_heap;
dd_gc_new_allocation (dd) = desired_per_heap;
+#ifdef USE_REGIONS
+ // we may have had some incoming objects during this GC -
+ // adjust the consumed budget for these
dd_new_allocation (dd) = desired_per_heap - already_consumed_per_heap;
+#else //USE_REGIONS
+ // for segments, we want to keep the .NET 6.0 behavior where we did not adjust
+ dd_new_allocation (dd) = desired_per_heap;
+#endif //USE_REGIONS
if (gen == 0)
{
@@ -40506,9 +40513,14 @@ void gc_heap::compute_new_dynamic_data (int gen_number)
}
dd_gc_new_allocation (dd) = dd_desired_allocation (dd);
+#ifdef USE_REGIONS
// we may have had some incoming objects during this GC -
// adjust the consumed budget for these
dd_new_allocation (dd) = dd_gc_new_allocation (dd) - in;
+#else //USE_REGIONS
+ // for segments, we want to keep the .NET 6.0 behavior where we did not adjust
+ dd_new_allocation (dd) = dd_gc_new_allocation (dd);
+#endif //USE_REGIONS
}
gen_data->pinned_surv = dd_pinned_survived_size (dd);