GC In Python: YAS (Yet Another Summary)

Markus Kohler markusk at bidra241.bbn.hp.com
Thu Jun 17 10:40:29 CEST 1999


Moshe Zadka <moshez at math.huji.ac.il> writes:

> On Wed, 16 Jun 1999, Robert Meegan wrote:
> 
> > On Wed, 16 Jun 1999, Moshe Zadka wrote:
> > 
> > > Regarding the recend discussion here about garbage collection, I wrote 
> > > a small article.
> > 
> > Moshe ---
> > 
> > You didn't provide the document or a URL.
> 
> You're absolutely right! Shame on me!
> http://www.geocities.com/TheTropics/Island/2932/gcpy.html
> 

First I think it would be interesting to see how much code is affected
by the problem you describe in your document. Ssince JPython
would have a problem with this kind of code one needs to fix the
standard libraries anyway. 

Your example could also be solved by using a GC with a finalization
mechanism that is aware of file objects. It would keep track how many
files are open and eventually do a collection.   

All the other solutions seems to make the implementation more
complicated and probably would decrease Pythons already not so good
performance. 

The main problem with introducing a GC in Python is that a lot of C-code
might directly point to Python objects which could be moved at runtime 
by a state of the art GC  (generational mark and sweep + copying GC). 

Markus
-- 
Markus Kohler  mailto:markus_kohler at hp.com




More information about the Python-list mailing list