@@ -1570,7 +1570,7 @@ assess_work_to_do(GCState *gcstate)
1570
1570
heap_fraction = max_heap_fraction ;
1571
1571
}
1572
1572
gcstate -> young .count = 0 ;
1573
- return new_objects + heap_fraction ;
1573
+ return new_objects + heap_fraction * 2 ;
1574
1574
}
1575
1575
1576
1576
static void
@@ -1617,6 +1617,7 @@ gc_collect_increment(PyThreadState *tstate, struct gc_collection_stats *stats)
1617
1617
increment_size += move_all_transitively_reachable (& working , & increment , gcstate -> visited_space );
1618
1618
assert (working .top == NULL );
1619
1619
}
1620
+ assert (increment_size == gc_list_size (& increment ));
1620
1621
GC_STAT_ADD (1 , objects_not_transitively_reachable , increment_size );
1621
1622
validate_list (& increment , collecting_clear_unreachable_clear );
1622
1623
gc_list_validate_space (& increment , gcstate -> visited_space );
@@ -1625,7 +1626,6 @@ gc_collect_increment(PyThreadState *tstate, struct gc_collection_stats *stats)
1625
1626
gc_collect_region (tstate , & increment , & survivors , stats );
1626
1627
gc_list_merge (& survivors , visited );
1627
1628
assert (gc_list_is_empty (& increment ));
1628
- gcstate -> work_to_do += gcstate -> heap_size / SCAN_RATE_DIVISOR / scale_factor ;
1629
1629
gcstate -> work_to_do -= increment_size ;
1630
1630
1631
1631
add_stats (gcstate , 1 , stats );
0 commit comments