Skip to content
Merged
Changes from 1 commit
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
Next Next commit
fix lower heap hard limit condition for regions
  • Loading branch information
mangod9 authored and github-actions committed Oct 4, 2022
commit ebeab20491f1ec703c01fc04abd3d6f00be70d59
5 changes: 4 additions & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44895,10 +44895,13 @@ HRESULT GCHeap::Initialize()
{
if (gc_heap::heap_hard_limit)
{
gc_heap::regions_range = 2 * gc_heap::heap_hard_limit;
// Keep the reservation size for regions similar to that for segments.
// We will initially reserve 6x the configured hard limit
gc_heap::regions_range = 6 * gc_heap::heap_hard_limit;
}
else
{
// If no hard_limit is configured the reservation size is max of 256gb or 2x physical limit
gc_heap::regions_range = max(((size_t)256 * 1024 * 1024 * 1024), (size_t)(2 * gc_heap::total_physical_mem));
}
gc_heap::regions_range = align_on_page(gc_heap::regions_range);
Expand Down