-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaned up version of earlier PR #48601. #56772
Conversation
Tagging subscribers to this area: @dotnet/gc Issue DetailsPort of ConserveMemory setting we implemented on .NET Framework.
|
} | ||
} | ||
|
||
if ((conserve_mem_setting != 0) && (n >= max_generation)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
n cannot be > max_generation... it can only be at most max_generation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know - I changed the >= to ==.
for (int hn = 0; hn < gc_heap::n_heaps; hn++) | ||
{ | ||
gc_heap* hp = gc_heap::g_heaps[hn]; | ||
size += hp->generation_sizes (hp->generation_of (gen_number)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should use generation_size
, not generation_sizes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, thanks for catching!
Remove changes for the heap_hard_limit case - we'll do those later. Fixed another place where I had called generation_sizes instead of generation_size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1193690302 |
Port of ConserveMemory setting we implemented on .NET Framework.