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