@@ -9607,6 +9607,7 @@ int gc_heap::grow_brick_card_tables (uint8_t* start,
9607
9607
#endif //CARD_BUNDLE
9608
9608
9609
9609
size_t alloc_size = card_table_element_layout[total_bookkeeping_elements];
9610
+ size_t commit_size = 0;
9610
9611
uint8_t* mem = (uint8_t*)GCToOSInterface::VirtualReserve (alloc_size, 0, virtual_reserve_flags);
9611
9612
9612
9613
if (!mem)
@@ -9620,14 +9621,16 @@ int gc_heap::grow_brick_card_tables (uint8_t* start,
9620
9621
9621
9622
{
9622
9623
// in case of background gc, the mark array will be committed separately (per segment).
9623
- size_t commit_size = card_table_element_layout[seg_mapping_table_element + 1];
9624
+ commit_size = card_table_element_layout[seg_mapping_table_element + 1];
9624
9625
9625
9626
if (!virtual_commit (mem, commit_size, recorded_committed_bookkeeping_bucket))
9626
9627
{
9628
+ commit_size = 0;
9627
9629
dprintf (GC_TABLE_LOG, ("Table commit failed"));
9628
9630
set_fgm_result (fgm_commit_table, commit_size, uoh_p);
9629
9631
goto fail;
9630
9632
}
9633
+
9631
9634
}
9632
9635
9633
9636
ct = (uint32_t*)(mem + card_table_element_layout[card_table_element]);
@@ -9799,6 +9802,7 @@ int gc_heap::grow_brick_card_tables (uint8_t* start,
9799
9802
dprintf (GC_TABLE_LOG, ("GCToOSInterface::VirtualRelease failed"));
9800
9803
assert (!"release failed");
9801
9804
}
9805
+ reduce_committed_bytes (mem, commit_size, recorded_committed_bookkeeping_bucket, -1, true);
9802
9806
}
9803
9807
9804
9808
return -1;
@@ -47769,10 +47773,6 @@ void gc_heap::verify_committed_bytes_per_heap()
47769
47773
47770
47774
void gc_heap::verify_committed_bytes()
47771
47775
{
47772
- #ifndef USE_REGIONS
47773
- // TODO, https://github.com/dotnet/runtime/issues/102706, re-enable the testing after fixing this bug
47774
- return;
47775
- #endif //!USE_REGIONS
47776
47776
size_t total_committed = 0;
47777
47777
size_t committed_decommit; // unused
47778
47778
size_t committed_free; // unused
0 commit comments