Skip to content
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

Added a fix for an incorrect assumption of an assertion failure re: failure to decommit. #105849

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 11 additions & 2 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44144,7 +44144,7 @@ size_t gc_heap::decommit_region (heap_segment* region, int bucket, int h_number)
}
#endif //BACKGROUND_GC

if (use_large_pages_p)
if (require_clearing_memory_p)
mrsharm marked this conversation as resolved.
Show resolved Hide resolved
{
assert (heap_segment_used (region) == heap_segment_mem (region));
}
Expand All @@ -44156,7 +44156,16 @@ size_t gc_heap::decommit_region (heap_segment* region, int bucket, int h_number)
assert ((region->flags & heap_segment_flags_ma_committed) == 0);
#endif //BACKGROUND_GC

global_region_allocator.delete_region (get_region_start (region));
if (require_clearing_memory_p)
{
global_region_allocator.delete_region (get_region_start (region));
}

else
{
// If decommit failed or if we are using large pages, set this value to 0.
decommit_size = 0;
}

return decommit_size;
}
Expand Down
Loading