guile-devel
[Top][All Lists]
Advanced

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

Re: gc issues


From: Mikael Djurfeldt
Subject: Re: gc issues
Date: 19 Sep 2000 14:37:49 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

Michael Livshin <address@hidden> writes:

> > Still, am I right saying that due to the multiprossor issue we _need_
> > locking to obtain a new cell?  Or am I missing something?
> 
> simplistically, yes.  really, not always.
> 
> in fact, the (supposedly) most common allocations (for pairs and
> closures) don't need locking -- you just have to scan cdrs of
> freecells conservatively.  the rest needs locking, but hopefully it's
> OK.
> 
> in general, the guideline should be this: if the way of scanning the
> cdr depends on the info in the car, then lock.
> 
> I hope this was coherent,

The original idea was, as you said earlier, to stop all threads during
GC.  Furthermore, the idea was not to stop them at any point but at a
well-defined point, like SCM_TICK or some other macro which we can
spread out through the Guile source.  (The original idea was to do it
in SCM_ALLOW_INTS.)

If we do this, we are guaranteed at GC time that newly initialized
cells are in a consistent state.


reply via email to

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