A couple garbage collector questions

Romuald Texier rtexier at elikya.com
Tue Apr 3 04:24:40 EDT 2001


Douglas Alan wrote:

> I have a couple of questions regarding the new Python garbage
> collector:
> 
>   (1) Why does it use the rather unusual algorithm it does, rather
>       than a more typical mark and sweep?  The per-object storage cost
>       for the extra reference count is surely greater than the bit or
>       two required for a typical mark and sweep.
> 
>   (2) Why does the algorithm need back-pointers for the object chain?
> 
> Just curious.  Thanks.
> 
> |>oug

The Ruby language uses a mark and sweep GC but it seems that it prevents it 
from using native threads (in particular Posix Threads) whereas the Python 
GC is thread safe. 



-- 
Romuald Texier



More information about the Python-list mailing list