[Top][All Lists]

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

Re: gc issues

From: Michael Livshin
Subject: Re: gc issues
Date: 13 Sep 2000 14:13:07 +0300
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (20 Minutes to Nikko)

Dirk Herrmann <address@hidden> writes:

> Further, I don't think conservative scanning of free cells is unclean.
> But, there is a completely different problem with regards of conservative
> scanning of free cells:  Free cells that are conservatively scanned are
> very likely to actually hold references into the heap:  A free cell has,
> at some time, been a non-free cell that got collected.  Thus, if not
> cleaned, the cell elements will hold the old contents, which are likely to
> be SCM values.  Conservative scanning of free cells will thus more
> probably inhibit garbage from getting collected.
> A solution could be to fill the free cells during sweep with SCM_BOOL_F or
> some other immediate value.  This, however, will also lead to a time
> penalty:  During sweep, there is one additional write operation for each
> single cell, and three additional write operations for each double
> cell.

I'm not sure I get your point here.


right now, free cells look like this: (frecell tag, link to next freecell).

i.e. the sweep phase already cleans them alright, unless they are
double cells (so it should clean them too, no big deal).

if you just naively trace them, you trace a whole cluster of them
(or whatever left of it), unless you just don't continue tracing if
the thing pointed to from a freecell is also a freecell.  feasible, I

> If we were thinking of going the way of conservative marking, we should
> probably rather go a different way:  Re-introduce the scm_tc_allocated
> type, and only have _those_ cells conservatively scanned.  This will, as
> we had it for some time now, also lead to a time penalty, but the penalty
> is one write access for each cell, independent of whether its a single or
> double cell, and, since a fresh cell's type tag will soon be overwritten
> anyway, the corresponding memory region will already be in the
> cache.

no need, in light of the above.

All ITS machines now have hardware for a new machine instruction --
Be Fruitful and Multiply.
Please update your programs.

reply via email to

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