On 1/23/06, Zbigniew <[EMAIL PROTECTED]> wrote: > Sorry if I'm being dense---why does it need to release any finalizers > at all, if the pending buffer is totally empty? I thought the size of > the pending buffer was the issue here. >
It's me who is dense, I guess - even if the pending buffer is empty we force a GC in the hope of filling up the buffer, so that we can then run the finalizers. It's likely that I'm overlooking the obvious, but the main problem as it appears to me is that we should avoid registering finalizers, once the live count goes above the pending buffer size. Otherwise we have more live finalizers that may be reclaimed in one go, which would result in a space leak in tight loops. I tested this with the numbers egg, doing bignum calculations in a loop, and getting it to work without leaking space (by forcing finalization through repeated GC) was a major piece of work. The mechanism used is likely to be suboptimal, but I haven't found a perfect solution yet. Any suggestions are of course welcome. cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
