Skip to content

Commit c59ac2f

Browse files
AA-Turnerezio-melotti
authored andcommitted
Fix image includes
1 parent 74731b4 commit c59ac2f

File tree

6 files changed

+5
-5
lines changed

6 files changed

+5
-5
lines changed

internals/garbage-collector.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ of that object when the algorithm starts. This is because the algorithm needs
181181
to modify the reference count to do the computations and in this way the
182182
interpreter will not modify the real reference count field.
183183

184-
.. figure:: images/python-cyclic-gc-1-new-page.png
184+
.. figure:: /_static/python-cyclic-gc-1-new-page.png
185185

186186
The GC then iterates over all containers in the first list and decrements by one the
187187
``gc_ref`` field of any other object that container is referencing. Doing
@@ -190,7 +190,7 @@ using the C API or inherited by a superclass) to know what objects are reference
190190
each container. After all the objects have been scanned, only the objects that have
191191
references from outside the “objects to scan” list will have ``gc_refs > 0``.
192192

193-
.. figure:: images/python-cyclic-gc-2-new-page.png
193+
.. figure:: /_static/python-cyclic-gc-2-new-page.png
194194

195195
Notice that having ``gc_refs == 0`` does not imply that the object is unreachable.
196196
This is because another object that is reachable from the outside (``gc_refs > 0``)
@@ -204,13 +204,13 @@ tentatively unreachable list. The following image depicts the state of the lists
204204
moment when the GC processed the ``link_3`` and ``link_4`` objects but has not
205205
processed ``link_1`` and ``link_2`` yet.
206206

207-
.. figure:: images/python-cyclic-gc-3-new-page.png
207+
.. figure:: /_static/python-cyclic-gc-3-new-page.png
208208

209209
Then the GC scans the next ``link_1`` object. Because it has ``gc_refs == 1``,
210210
the gc does not do anything special because it knows it has to be reachable (and is
211211
already in what will become the reachable list):
212212

213-
.. figure:: images/python-cyclic-gc-4-new-page.png
213+
.. figure:: /_static/python-cyclic-gc-4-new-page.png
214214

215215
When the GC encounters an object which is reachable (``gc_refs > 0``), it traverses
216216
its references using the ``tp_traverse`` slot to find all the objects that are
@@ -225,7 +225,7 @@ objects that have already been visited once (by unsetting the ``PREV_MASK_COLLEC
225225
flag) so that if an object that has already been processed is referenced by some other
226226
object, the GC does not process it twice.
227227

228-
.. figure:: images/python-cyclic-gc-5-new-page.png
228+
.. figure:: /_static/python-cyclic-gc-5-new-page.png
229229

230230
Notice that an object that was marked as "tentatively unreachable" and was later
231231
moved back to the reachable list will be visited again by the garbage collector

0 commit comments

Comments
 (0)