Skip to content

Commit

Permalink
Avoid clearing mark array when it was not committed (#84734)
Browse files Browse the repository at this point in the history
  • Loading branch information
cshung authored Apr 14, 2023
1 parent 27b8a24 commit 510e9fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9633,7 +9633,10 @@ void gc_heap::remove_ro_segment (heap_segment* seg)
#ifdef BACKGROUND_GC
if (gc_can_use_concurrent)
{
seg_clear_mark_array_bits_soh (seg);
if ((seg->flags & heap_segment_flags_ma_committed) || (seg->flags & heap_segment_flags_ma_pcommitted))
{
seg_clear_mark_array_bits_soh (seg);
}
}
#endif //BACKGROUND_GC

Expand Down

0 comments on commit 510e9fb

Please sign in to comment.