Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 3ae2d45

Browse files
committed
Code review feedback:
1. Remove useless asserts 2. Remove a dead code path 3. Add a LocalGC TODO to comment
1 parent f3d779e commit 3ae2d45

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/gc/gc.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15910,6 +15910,7 @@ start_no_gc_region_status gc_heap::prepare_for_no_gc_region (uint64_t total_size
1591015910
#endif // MULTIPLE_HEAPS
1591115911

1591215912
uint64_t total_allowed_soh_allocation = max_soh_allocated * num_heaps;
15913+
// [LOCALGC TODO]
1591315914
// In theory, the upper limit here is the physical memory of the machine, not
1591415915
// SIZE_T_MAX. This is not true today because total_physical_mem can be
1591515916
// larger than SIZE_T_MAX if running in wow64 on a machine with more than
@@ -15940,19 +15941,11 @@ start_no_gc_region_status gc_heap::prepare_for_no_gc_region (uint64_t total_size
1594015941
allocation_no_gc_loh = min (allocation_no_gc_loh, total_allowed_loh_alloc_scaled);
1594115942
}
1594215943

15943-
15944-
if (allocation_no_gc_soh > total_allowed_soh_allocation)
15945-
{
15946-
status = start_no_gc_too_large;
15947-
goto done;
15948-
}
15949-
1595015944
if (disallow_full_blocking)
1595115945
current_no_gc_region_info.minimal_gc_p = TRUE;
1595215946

1595315947
if (allocation_no_gc_soh != 0)
1595415948
{
15955-
assert(allocation_no_gc_soh <= SIZE_T_MAX);
1595615949
current_no_gc_region_info.soh_allocation_size = static_cast<size_t>(allocation_no_gc_soh);
1595715950
size_per_heap = current_no_gc_region_info.soh_allocation_size;
1595815951
#ifdef MULTIPLE_HEAPS
@@ -15969,7 +15962,6 @@ start_no_gc_region_status gc_heap::prepare_for_no_gc_region (uint64_t total_size
1596915962

1597015963
if (allocation_no_gc_loh != 0)
1597115964
{
15972-
assert(allocation_no_gc_soh <= SIZE_T_MAX);
1597315965
current_no_gc_region_info.loh_allocation_size = static_cast<size_t>(allocation_no_gc_loh);
1597415966
size_per_heap = current_no_gc_region_info.loh_allocation_size;
1597515967
#ifdef MULTIPLE_HEAPS

0 commit comments

Comments
 (0)