Skip to content

Conversation

@PeterSolMS
Copy link
Contributor

Port of ConserveMemory setting we implemented on .NET Framework.

@PeterSolMS PeterSolMS requested review from Maoni0, cshung and mangod9 August 3, 2021 10:51
@ghost ghost added the area-GC-coreclr label Aug 3, 2021
@ghost
Copy link

ghost commented Aug 3, 2021

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Issue Details

Port of ConserveMemory setting we implemented on .NET Framework.

Author: PeterSolMS
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

}
}

if ((conserve_mem_setting != 0) && (n >= max_generation))
Copy link
Member

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.

Copy link
Contributor Author

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));
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, thanks for catching!

Copy link
Member

@Maoni0 Maoni0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@PeterSolMS PeterSolMS merged commit 158b26e into dotnet:main Aug 31, 2021
@PeterSolMS
Copy link
Contributor Author

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2021

@ghost ghost locked as resolved and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants