Skip to content

Commit 9cfb5f0

Browse files
committed
Tweak work to do calculation
1 parent 5f6d04e commit 9cfb5f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/test/test_gc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ def make_ll(depth):
11341134
olds.append(newhead)
11351135
if len(olds) == 20:
11361136
new_objects = _testinternalcapi.get_heap_size() - initial_heap_size
1137-
self.assertLess(new_objects, 27_000)
1137+
self.assertLess(new_objects, 25_000)
11381138
del olds[:]
11391139
if not enabled:
11401140
gc.disable()

Python/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ assess_work_to_do(GCState *gcstate)
15761576
}
15771577
gcstate->young.count = 0;
15781578
gcstate->prior_heap_size = gcstate->heap_size;
1579-
return new_objects*2 + growth*2 + heap_fraction;
1579+
return new_objects*3/2 + growth*2 + heap_fraction*3/2;
15801580
}
15811581

15821582
static void

0 commit comments

Comments
 (0)