Skip to content

Commit 14ae8d7

Browse files
committed
A few more edits
1 parent b9467ec commit 14ae8d7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

InternalDocs/garbage_collector.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -506,20 +506,20 @@ We use the same technique of forming a transitive closure as the incremental
506506
collector does to find reachable objects, seeding the list with some global
507507
objects and the current frame of each stack.
508508

509-
This mark phase moves all objects `visited` space, as follows:
509+
This phase moves objects to the `visited` space, as follows:
510510

511-
1. All objects directly referred by any builtin class, the `sys` module, the `builtins`
511+
1. All objects directly referred to by any builtin class, the `sys` module, the `builtins`
512512
module and all objects directly referred to from stack frames are added to a working
513513
set of reachable objects.
514514
2. Until this working set is empty:
515515
1. Pop an object from the set and move it to the `visited` space
516516
2. For each object directly reachable from that object:
517517
* If it is not already in `visited` space and it is a GC object,
518-
then move it to the working set
518+
then add it to the working set
519519

520-
Before each increment of collection is performed, any stack frames that have been created
521-
since the last increment are added to the working set and above algorithm is repeated,
522-
starting from step 2.
520+
Before each increment of collection is performed, the working set is updated to
521+
include any new stack frames that have been created since the last increment.
522+
Then the above algorithm is repeated, starting from step 2.
523523

524524

525525
Optimization: reusing fields to save memory

0 commit comments

Comments
 (0)