File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -1565,6 +1565,7 @@ gc_collect_increment(PyThreadState *tstate, struct gc_collection_stats *stats)
15651565 GC_STAT_ADD (1 , collections , 1 );
15661566 GCState * gcstate = & tstate -> interp -> gc ;
15671567 gcstate -> work_to_do += gcstate -> young .count ;
1568+ gcstate -> young .count = 0 ;
15681569 if (gcstate -> phase == GC_PHASE_MARK ) {
15691570 Py_ssize_t objects_marked = mark_at_start (tstate );
15701571 GC_STAT_ADD (1 , objects_transitively_reachable , objects_marked );
@@ -1585,7 +1586,6 @@ gc_collect_increment(PyThreadState *tstate, struct gc_collection_stats *stats)
15851586 gc_list_set_space (& gcstate -> young .head , gcstate -> visited_space );
15861587 untrack_tuples (& gcstate -> young .head );
15871588 gc_list_merge (& gcstate -> young .head , & increment );
1588- gcstate -> young .count = 0 ;
15891589 gc_list_validate_space (& increment , gcstate -> visited_space );
15901590 Py_ssize_t increment_size = 0 ;
15911591 while (increment_size < gcstate -> work_to_do ) {
You can’t perform that action at this time.
0 commit comments