develooper Front page | perl.perl6.internals | Postings from February 2001

Re: Garbage collection

Thread Previous
Bryan C . Warnock
February 12, 2001 03:22
Re: Garbage collection
Message ID:
On Sunday 11 February 2001 22:48, Jan Dubois wrote:
> Doing full GC in this fashion after failed API calls will probably wipe
> out any performance gain mark-and-sweep has over reference counting.

Well, after select failed API calls, not every call.  And mark-and-sweep, 
if that's the GC scheme used.  But that's not the only time GC would be 
done, meaning that Last Resort calls should/would never be called.  
I mean, scheme-independent, if you run out of memory or file descriptors, 
how fast is your code going to run?

> >Well, no.  My thought would be if A needed to be destroyed before B, 
then B 
> >wouldn't/shouldn't be marked for GC until after A was destroyed.  It 
> >take several sweeps to clean an entire dependency tree, unfortunately.  
> But *how* do you implement this dependency in a way that is *cheaper* than
> reference counting?  You can save some memory by only reference counting
> objects and not simple values, but this increases runtime cost beyond
> simply reference counting everything.

Well, if I knew this answer, I'd be a pillar of the Perl community.  :-)

Bryan C. Warnock

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About