* Questions about the gc
@ 2004-09-25 20:26 Thiago F.G. Albuquerque
2004-09-25 23:13 ` Stephen Compall
0 siblings, 1 reply; 2+ messages in thread
From: Thiago F.G. Albuquerque @ 2004-09-25 20:26 UTC (permalink / raw)
Hi,
I am new to guile; I am trying to understand how it works. Does it use a
separate stack, or it uses the C stack? If the latter is the case, how
does the gc know which elements of the stack are pointers? And, among the
pointers, how does is know which ones point to guile objects?
TIA,
Thiago
--
() ascii ribbon campaign - against html mail
/\ - against microsoft attachments
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Questions about the gc
2004-09-25 20:26 Questions about the gc Thiago F.G. Albuquerque
@ 2004-09-25 23:13 ` Stephen Compall
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Compall @ 2004-09-25 23:13 UTC (permalink / raw)
Cc: guile-devel
"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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-25 23:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-25 20:26 Questions about the gc Thiago F.G. Albuquerque
2004-09-25 23:13 ` Stephen Compall
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).