[Top][All Lists]

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

Re: Questions about the gc

From: Stephen Compall
Subject: Re: Questions about the gc
Date: 25 Sep 2004 18:13:36 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

"Thiago F.G. Albuquerque" <address@hidden> writes:

> Does [Guile] use a separate stack, or it uses the C stack?

C stack.

> If the latter is the case, how does the gc know which elements of
> the stack are pointers?

It assumes all elements are pointers.

> And, among the pointers, how does is know which ones point to guile
> objects?

Guile knows the pointer ranges it cares about.  These are organized
into areas of memory called "cards".  If a pointer (anything on the
stack between the bottom and current sp, again) points to a cell
location in one of the cards, and the cell is allocated, the cell gets
marked.  Depending on the type of the cell, you may enter recursive

OT: Other possibilities for GC include reference counting (a pain, as
in Python) and explicit gcproing (as in Emacs).  Neither of these does
nearly as good a job of separating out the GC code from the "normal"
code; in fact, they don't even try.  With mark/sweep, you only need
occasionally scm_remember_upto_here_* in certain special cases.

Stephen Compall or s11 or sirian

Over the years, I've developed my sense of deja vu so acutely that now
I can remember things that *have* happened before ...

Arnett ASO top secret Merlin Echelon supercomputer blackjack USDOJ
bomb lock picking Semtex unclassified credit card afsatcom dictionary

reply via email to

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