Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21387,7 +21387,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)
{
Expand Down Expand Up @@ -40425,9 +40432,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);
Expand Down