Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c905164

Browse files
committed
Fix small bug. The count of objects in all generations younger then the
collected one should be zeroed.
1 parent 0d3b2fe commit c905164

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/gcmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ collect(int generation)
396396
if (generation+1 < NUM_GENERATIONS)
397397
generations[generation+1].count += 1;
398398
for (i = 0; i <= generation; i++)
399-
generations[generation].count = 0;
399+
generations[i].count = 0;
400400

401401
/* merge younger generations with one we are currently collecting */
402402
for (i = 0; i < generation; i++) {

0 commit comments

Comments
 (0)