@@ -13484,10 +13484,20 @@ HRESULT gc_heap::initialize_gc (size_t soh_segment_size,
13484
13484
if (!reserve_initial_memory (soh_segment_size, loh_segment_size, poh_segment_size, number_of_heaps,
13485
13485
use_large_pages_p, separated_poh_p, heap_no_to_numa_node))
13486
13486
return E_OUTOFMEMORY;
13487
- if (separated_poh_p )
13487
+ if (use_large_pages_p )
13488
13488
{
13489
- heap_hard_limit_oh[poh] = min_segment_size_hard_limit * number_of_heaps;
13490
- heap_hard_limit += heap_hard_limit_oh[poh];
13489
+ if (heap_hard_limit_oh[soh])
13490
+ {
13491
+ heap_hard_limit_oh[soh] = soh_segment_size * number_of_heaps;
13492
+ heap_hard_limit_oh[loh] = loh_segment_size * number_of_heaps;
13493
+ heap_hard_limit_oh[poh] = poh_segment_size * number_of_heaps;
13494
+ heap_hard_limit = heap_hard_limit_oh[soh] + heap_hard_limit_oh[loh] + heap_hard_limit_oh[poh];
13495
+ }
13496
+ else
13497
+ {
13498
+ assert (heap_hard_limit);
13499
+ heap_hard_limit = (soh_segment_size + loh_segment_size + poh_segment_size) * number_of_heaps;
13500
+ }
13491
13501
}
13492
13502
#endif //USE_REGIONS
13493
13503
@@ -44802,10 +44812,6 @@ HRESULT GCHeap::Initialize()
44802
44812
44803
44813
#endif //HOST_64BIT
44804
44814
GCConfig::SetGCLargePages(gc_heap::use_large_pages_p);
44805
- GCConfig::SetGCHeapHardLimit(static_cast<int64_t>(gc_heap::heap_hard_limit));
44806
- GCConfig::SetGCHeapHardLimitSOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[soh]));
44807
- GCConfig::SetGCHeapHardLimitLOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[loh]));
44808
- GCConfig::SetGCHeapHardLimitPOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[poh]));
44809
44815
44810
44816
uint32_t nhp = 1;
44811
44817
uint32_t nhp_from_config = 0;
@@ -44960,6 +44966,11 @@ HRESULT GCHeap::Initialize()
44960
44966
hr = gc_heap::initialize_gc (seg_size, large_seg_size, pin_seg_size);
44961
44967
#endif //MULTIPLE_HEAPS
44962
44968
44969
+ GCConfig::SetGCHeapHardLimit(static_cast<int64_t>(gc_heap::heap_hard_limit));
44970
+ GCConfig::SetGCHeapHardLimitSOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[soh]));
44971
+ GCConfig::SetGCHeapHardLimitLOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[loh]));
44972
+ GCConfig::SetGCHeapHardLimitPOH(static_cast<int64_t>(gc_heap::heap_hard_limit_oh[poh]));
44973
+
44963
44974
if (hr != S_OK)
44964
44975
return hr;
44965
44976
0 commit comments