Skip to content

Commit

Permalink
Exclude segment_standby_list from regions
Browse files Browse the repository at this point in the history
  • Loading branch information
cshung committed Sep 2, 2022
1 parent 5e7cfbf commit c6cb320
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2715,10 +2715,11 @@ uint64_t gc_heap::total_loh_a_last_bgc = 0;
#endif //BGC_SERVO_TUNING

size_t gc_heap::eph_gen_starts_size = 0;
heap_segment* gc_heap::segment_standby_list;
#if defined(USE_REGIONS)
region_free_list gc_heap::global_regions_to_decommit[count_free_region_kinds];
region_free_list gc_heap::global_free_huge_regions;
#else
heap_segment* gc_heap::segment_standby_list;
#endif //USE_REGIONS
bool gc_heap::use_large_pages_p = 0;
#ifdef HEAP_BALANCE_INSTRUMENTATION
Expand Down Expand Up @@ -13650,7 +13651,9 @@ gc_heap::init_semi_shared()
goto cleanup;
#endif //FEATURE_BASICFREEZE

#ifndef USE_REGIONS
segment_standby_list = 0;
#endif //USE_REGIONS

if (!full_gc_approach_event.CreateManualEventNoThrow(FALSE))
{
Expand Down Expand Up @@ -44597,6 +44600,7 @@ HRESULT GCHeap::StaticShutdown()
#endif // FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
}

#ifndef USE_REGIONS
//destroy all segments on the standby list
while(gc_heap::segment_standby_list != 0)
{
Expand All @@ -44608,6 +44612,7 @@ HRESULT GCHeap::StaticShutdown()
#endif //MULTIPLE_HEAPS
gc_heap::segment_standby_list = next_seg;
}
#endif // USE_REGIONS

#ifdef MULTIPLE_HEAPS

Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/gc/gcpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -4962,8 +4962,10 @@ class gc_heap
PER_HEAP
heap_segment* freeable_uoh_segment;

#ifndef USE_REGIONS
PER_HEAP_ISOLATED
heap_segment* segment_standby_list;
#endif

#ifdef USE_REGIONS
PER_HEAP_ISOLATED
Expand Down

0 comments on commit c6cb320

Please sign in to comment.