Garbage Collection Patch for Python

Neil Schemenauer nascheme@enme.ucalgary.ca
Sat, 25 Sep 99 02:42:10 GMT


Garbage Collection for Python
   
This patch adds garbage collection to Python 1.5.2c1. Reference
counting is still used. The garbage collector only frees memory that
the reference counting does not (ie. reference cycles). This seems to
provide the best performance.

    http://www.acs.ucalgary.ca/~nascheme/python/gc.html

Currently the patch is only tested on Linux. It will probably work on
other Unix machines as well. On my Linux machine, the GC version of
Python passes all regession tests.

Sample usage:
    $ cd Python-1.5.2c1
    $ patch -p1 < ../gc-python-1.diff
    $ ./configure --with-gc

The patch assumes you have libgc.a installed somewhere so that linking
with -lgc works (/usr/local/lib should be okay). If you don't have the
library, download and install it before compiling.

If you are trying to fix a memory leaking Python program, Tim Peter's
Cyclops module may also be useful. It is available on the Python ftp
site.

Last updated Thu 23 Sep 1999 Neil Schemenauer 

<P><A HREF="http://www.acs.ucalgary.ca/~nascheme/python/gc.html">Garbage
Collection Patch</A> - a patch to add garbage collection to Python; for
Linux/UNIX.  (23-Sep-99)

-- 
----------- comp.lang.python.announce (moderated) ----------
Article Submission Address:  python-announce@python.org
Python Language Home Page:   http://www.python.org/
Python Quick Help Index:     http://www.python.org/Help.html
------------------------------------------------------------