Skip to content

Conversation

@cshung
Copy link
Contributor

@cshung cshung commented Sep 26, 2022

When we are checking for whether or not we had sufficient space for allocating in gen0, we assumed that whatever memory needs to be allocated had to be committed, so we used that value to check_against_hard_limit.

But very often, gen 0 already has a good deal of committed memory, most often on the end space of the allocating region, so we should be discounting those before we check_against_hard_limit.

@ghost ghost added the area-GC-coreclr label Sep 26, 2022
@cshung cshung self-assigned this Sep 26, 2022
@ghost
Copy link

ghost commented Sep 26, 2022

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

Issue Details

When we are checking for whether or not we had sufficient space for allocating in gen0, we assumed that whatever memory needs to be allocated had to be committed, so we used that value to check_against_hard_limit.

But very often, gen 0 already has a good deal of committed memory, most often on the end space of the allocating region, so we should be discounting those before we check_against_hard_limit.

Author: cshung
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

@cshung cshung marked this pull request as draft September 26, 2022 23:32
@cshung
Copy link
Contributor Author

cshung commented Sep 27, 2022

In order to avoid the call site inside the GC to depend on the value being 0, let's have a separate function for this.

@cshung cshung force-pushed the public/discount-committed branch 3 times, most recently from e4cd058 to 1f972a5 Compare September 29, 2022 07:13
@cshung cshung force-pushed the public/discount-committed branch from 1f972a5 to 9217b54 Compare September 29, 2022 07:17
@cshung cshung mentioned this pull request Sep 30, 2022
@cshung cshung closed this Oct 7, 2022
@cshung cshung deleted the public/discount-committed branch October 7, 2022 00:51
@ghost ghost locked as resolved and limited conversation to collaborators Nov 6, 2022
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.

1 participant