@@ -13324,8 +13324,6 @@ void gc_heap::age_free_regions (const char* msg)
13324
13324
// amount and move the rest back to the (one) heap's free_list.
13325
13325
void gc_heap::distribute_free_regions()
13326
13326
{
13327
- #ifdef USE_REGIONS
13328
- const int kind_count = large_free_region + 1;
13329
13327
13330
13328
#ifdef MULTIPLE_HEAPS
13331
13329
BOOL joined_last_gc_before_oom = FALSE;
@@ -13420,43 +13418,6 @@ void gc_heap::distribute_free_regions()
13420
13418
global_free_huge_regions.transfer_regions (&hp->free_regions[huge_free_region]);
13421
13419
}
13422
13420
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
- }
13460
13421
move_all_aged_regions(total_num_free_regions, aged_regions, joined_last_gc_before_oom);
13461
13422
// For now, we just decommit right away, but eventually these will be used in move_highest_free_regions
13462
13423
move_regions_to_decommit(aged_regions);
@@ -13581,7 +13542,7 @@ void gc_heap::distribute_free_regions()
13581
13542
else
13582
13543
{
13583
13544
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]));
13585
13546
13586
13547
// cannot assert we moved any regions because there may be a single huge region with more than we want to decommit
13587
13548
}
@@ -13890,9 +13851,7 @@ void gc_heap::decide_on_decommit_strategy(bool joined_last_gc_before_oom)
13890
13851
}
13891
13852
#endif //MULTIPLE_HEAPS
13892
13853
}
13893
-
13894
13854
#endif //USE_REGIONS
13895
- }
13896
13855
13897
13856
#ifdef WRITE_WATCH
13898
13857
uint8_t* g_addresses [array_size+2]; // to get around the bug in GetWriteWatch
0 commit comments