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
Fix trim_youngest_desired for the case of high memory load and huge m…
…ain memory - the return value should never be larger than total_new_allocation.
  • Loading branch information
PeterSolMS authored and github-actions committed Sep 2, 2021
commit 7dac87343eef70da13e4d270e5b0a735580bf8a5
3 changes: 2 additions & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38191,7 +38191,8 @@ size_t gc_heap::trim_youngest_desired (uint32_t memory_load,
}
else
{
return max (mem_one_percent, total_min_allocation);
size_t total_max_allocation = max (mem_one_percent, total_min_allocation);
return min (total_new_allocation, total_max_allocation);
}
}

Expand Down