unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Stephen Compall <s11@member.fsf.org>
Cc: guile-devel@gnu.org
Subject: Re: Questions about the gc
Date: 25 Sep 2004 18:13:36 -0500	[thread overview]
Message-ID: <xfy4qlmrlgf.fsf@csserver.evansville.edu> (raw)
In-Reply-To: <Pine.LNX.4.61.0409240950090.1240@thiago>

"Thiago F.G. Albuquerque" <tfga@terra.com.br> 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
marking.

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


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


      reply	other threads:[~2004-09-25 23:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-25 20:26 Questions about the gc Thiago F.G. Albuquerque
2004-09-25 23:13 ` Stephen Compall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xfy4qlmrlgf.fsf@csserver.evansville.edu \
    --to=s11@member.fsf.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).