@@ -13324,8 +13324,6 @@ void gc_heap::age_free_regions (const char* msg)
1332413324// amount and move the rest back to the (one) heap's free_list.
1332513325void gc_heap::distribute_free_regions()
1332613326{
13327- #ifdef USE_REGIONS
13328- const int kind_count = large_free_region + 1;
1332913327
1333013328#ifdef MULTIPLE_HEAPS
1333113329 BOOL joined_last_gc_before_oom = FALSE;
@@ -13420,43 +13418,6 @@ void gc_heap::distribute_free_regions()
1342013418 global_free_huge_regions.transfer_regions (&hp->free_regions[huge_free_region]);
1342113419 }
1342213420
13423- for (int gen = soh_gen0; gen < total_generation_count; gen++)
13424- {
13425- if ((gen <= soh_gen2) &&
13426- total_budget_in_region_units[basic_free_region] >= (total_num_free_regions[basic_free_region] +
13427- surplus_regions[basic_free_region].get_num_free_regions()))
13428- {
13429- // don't accumulate budget from higher soh generations if we cannot cover lower ones
13430- dprintf (REGIONS_LOG, ("out of free regions - skipping gen %d budget = %zd >= avail %zd",
13431- gen,
13432- total_budget_in_region_units[basic_free_region],
13433- total_num_free_regions[basic_free_region] + surplus_regions[basic_free_region].get_num_free_regions()));
13434- continue;
13435- }
13436- #ifdef MULTIPLE_HEAPS
13437- for (int i = 0; i < n_heaps; i++)
13438- {
13439- gc_heap* hp = g_heaps[i];
13440- #else //MULTIPLE_HEAPS
13441- {
13442- gc_heap* hp = pGenGCHeap;
13443- // just to reduce the number of #ifdefs in the code below
13444- const int i = 0;
13445- const int n_heaps = 1;
13446- #endif //MULTIPLE_HEAPS
13447- ptrdiff_t budget_gen = max (hp->estimate_gen_growth (gen), 0);
13448- int kind = gen >= loh_generation;
13449- size_t budget_gen_in_region_units = (budget_gen + (region_size[kind] - 1)) / region_size[kind];
13450- dprintf (REGIONS_LOG, ("h%2d gen %d has an estimated growth of %zd bytes (%zd regions)", i, gen, budget_gen, budget_gen_in_region_units));
13451- if (gen <= soh_gen2)
13452- {
13453- // preserve the budget for the previous generation - we should not go below that
13454- min_heap_budget_in_region_units[i] = heap_budget_in_region_units[i][kind];
13455- }
13456- heap_budget_in_region_units[i][kind] += budget_gen_in_region_units;
13457- total_budget_in_region_units[kind] += budget_gen_in_region_units;
13458- }
13459- }
1346013421 move_all_aged_regions(total_num_free_regions, aged_regions, joined_last_gc_before_oom);
1346113422 // For now, we just decommit right away, but eventually these will be used in move_highest_free_regions
1346213423 move_regions_to_decommit(aged_regions);
@@ -13581,7 +13542,7 @@ void gc_heap::distribute_free_regions()
1358113542 else
1358213543 {
1358313544 dprintf (REGIONS_LOG, ("Moved %zd %s regions to decommit list",
13584- global_regions_to_decommit[huge_free_region].get_num_free_regions(), free_region_kind_name[huge_free_region]));
13545+ global_regions_to_decommit[huge_free_region].get_num_free_regions(), free_region_kind_name[huge_free_region]));
1358513546
1358613547 // cannot assert we moved any regions because there may be a single huge region with more than we want to decommit
1358713548 }
@@ -13890,9 +13851,7 @@ void gc_heap::decide_on_decommit_strategy(bool joined_last_gc_before_oom)
1389013851 }
1389113852#endif //MULTIPLE_HEAPS
1389213853}
13893-
1389413854#endif //USE_REGIONS
13895- }
1389613855
1389713856#ifdef WRITE_WATCH
1389813857uint8_t* g_addresses [array_size+2]; // to get around the bug in GetWriteWatch
0 commit comments