chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] (gc)


From: felix
Subject: Re: [Chicken-users] (gc)
Date: Fri, 9 Aug 2002 21:40:19 +0200

>One thing I've noticed with an explicit (gc) call is that finalizers
>aren't run as soon as they could be. I'd have expected an explicit
>call to (gc) to clean up as much as it can; ie. "(gc) implies
>(##sys#force-finalizers)". I'd like to have a "published" API for
>forcing greedy-finalization; calling a ##sys procedure seems
>dirty. I'd find this handy for example in SOCKET:accept, where a call
>to (gc) could help ensure that "dead" file descriptors are promptly
>recycled.
>
>What do other people think?


Reasonable. But there are really two modes for `gc':
you either want a minor collection (to save live data in the heap,
for example for FFI things you might need that, and this has to be fast).
Or you want a full GC (`(gc #t)'). This should invoke '##sys#force-finalizers'.


cheers,
felix





reply via email to

[Prev in Thread] Current Thread [Next in Thread]