[Patches] portable garbage collection for Python
Christian Tismer
tismer@tismer.com
Wed, 05 Apr 2000 17:22:13 +0200
Neil Schemenauer wrote:
>
> I have a new version of my garbage collection patch available.
> If you have time please test it out and send me comments. The
> patch against the current CVS version of Python is available
> from:
>
> http://www.enme.ucalgary.ca/~nascheme/python/gc-cycle.diff
>
> I will give some more details on my approach tomorrow after I get
> some rest. :)
This looks really great!
One minor bug from just reading the diff:
***************
*** 215,220 ****
--- 219,227 ----
PyListObject *op;
{
int i;
+ #ifdef WITH_CYCLE_GC
+ PyGC_Remove((PyObject *)op);
+ #endif
Py_TRASHCAN_SAFE_BEGIN(op)
if (op->ob_item != NULL) {
/* Do it backwards, for Christian Tismer.
***************
*** 227,233 ****
}
free((ANY *)op->ob_item);
}
Code must not be inserted before Py_TRASHCAN_SAFE_BEGIN,
this construct is supposed to enclose the whole destruction
process, whatever it is.
cheers - chris
--
Christian Tismer :^) <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH : Have a break! Take a ride on Python's
Kaunstr. 26 : *Starship* http://starship.python.net
14163 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
where do you want to jump today? http://www.stackless.com