guile-devel
[Top][All Lists]
Advanced

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

Re: lazy sweeping.


From: Michael Livshin
Subject: Re: lazy sweeping.
Date: Mon, 29 Jul 2002 16:00:08 +0300
User-agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Honest Recruiter, i686-pc-linux)

Han-Wen Nienhuys <address@hidden> writes:

> address@hidden writes:
>> if I remember correctly, Guile has some logic to cope with suddenly
>> running out of file descriptors: it calls GC in the hope that some
>> port objects are unreachable.
>> 
>> I guess now you don't have to nesessarily do a full GC right away,
>> instead you may want to finish the sweep first and see if that helps,
>> and only do a new GC if finishing the sweep haven't helped.  hmm.  so
>> that's not as fiddly as I thought, and probably works as it is.
>> 
>> ditto for malloced memory, I guess.
>
> Hrm. I'll have to add some more logic then -- we want to be able to
> completely clean the heap, but not advance the "free mem starts here"
> pointer. What would be the right behavior: doing a full sweep, or a
> mark + full sweep? Or maybe just both (first the full sweep, if it
> doesn't yield enough: the full mark.)

that's what I've meant, yes.  however, it's just as optimization, and
the occurences where it might theoretically matter (system heap
exhaustion or running out of file descriptors) could probably be
considered to be rare enough.

as long as you take care to finish the last sweep before marking, you
should be fine, correctness-wise.

-- 
REALITY is an illusion that stays put.





reply via email to

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