Skip to content

Commit 111b2bb

Browse files
committed
Update garbage_collector.rst
1 parent b40b030 commit 111b2bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

garbage_collector.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ In order to limit the time each garbage collection takes, the GC is uses a popul
294294
optimization: generations. The main idea behind this concept is the assumption that
295295
most objects have a very short lifespan and can thus be collected shortly after their
296296
creation. This has proven to be very close to the reality of many Python programs as
297-
many temporary objects are created and destroyed very fast. The older an object is
297+
many temporarily objects are created and destroyed very fast. The older an object is
298298
the less likely it is to become unreachable.
299299

300300
To take advantage of this fact, all container objects are segregated across
@@ -399,11 +399,11 @@ word-aligned addresses end in ``000``, leaving the last 3 bits available.
399399
The CPython GC makes use of two fat pointers:
400400

401401
* The ``_gc_prev``` field is normally used as the "previous" pointer to maintain the
402-
doubly linked list but its lowest two bits are used to keep some flags like
402+
doubly linked list but its lowest two bits are used to keep the flags
403403
``PREV_MASK_COLLECTING`` and ``_PyGC_PREV_MASK_FINALIZED``. Between collections,
404404
the only flag that can be present is ``_PyGC_PREV_MASK_FINALIZED`` that indicates
405405
if an object has been already finalized. During collections ``_gc_prev`` is
406-
temporary used for storing the temporary copy of the reference count (``gc_refs``),
406+
temporarily used for storing the temporarily copy of the reference count (``gc_refs``),
407407
and the GC linked list becomes a singly linked list until ``_gc_prev`` is restored.
408408

409409
* The ``_gc_next`` field is used as the "next" pointer to maintain the doubly linked

0 commit comments

Comments
 (0)