Skip to content

Commit

Permalink
Avoid using a null heap to decommit the mark array
Browse files Browse the repository at this point in the history
  • Loading branch information
cshung committed Jan 17, 2023
1 parent 56a0505 commit f03127b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41128,7 +41128,8 @@ size_t gc_heap::decommit_region (heap_segment* region, int bucket, int h_number)
if ((region->flags & heap_segment_flags_ma_committed) != 0)
{
#ifdef MULTIPLE_HEAPS
gc_heap* hp = heap_segment_heap (region);
// For regions, it doesn't matter which heap is used to decommit the mark array
gc_heap* hp = g_heaps [0];
#else
gc_heap* hp = pGenGCHeap;
#endif
Expand Down

0 comments on commit f03127b

Please sign in to comment.