From: Han-Wen Nienhuys <hanwen@cs.uu.nl>
Cc: guile-devel@gnu.org, jantien@xs4all.nl
Subject: Re: GUILE GC -- Write barrier for vectors
Date: Mon, 15 Jul 2002 20:22:19 +0200 [thread overview]
Message-ID: <15667.4827.763060.19585@meddo.cs.uu.nl> (raw)
In-Reply-To: <Pine.GSO.4.05.10207151822480.26074-100000@sallust.ida.ing.tu-bs.de>
dirk@sallust.ida.ing.tu-bs.de writes:
> > Also, smobs and maybe some other types (which ones? structs?), are
> > always assumed to have been changed, since they are outside of GC's
> > control. It would probably be best to allocate them from a different
> > pool so that they won't poison the normal generations, but that would
> > require a slight extension of the GUILE API.
>
> Do you have a suggestion for such an extension?
SCM scm_changing_cell()
SCM scm_changing_vector()
They would be allocated from a separate memory pool. Also if we
redefine the GC engine to use a different function internally
(i.e. scm_gc_internal_mark), then we can distinguish between data
cells that may be moved (only pointed to from within the heap), and
other cells (marked by scm_gc_mark: conservatively marked entries,
pointed to from smobs, etc.).
The copiable cells could be subjected to copying GC, although it would
require another scan of the entire heap.
>I think, summarizing all thoughts in workbook will be quite helpful.
I much prefer comments in the source code. If you're serious about
hacking that's the first place where you go looking anyways.
> > * Direct write access to a vector must be done through the macro
> > SCM_WRITABLE_VELTS.
>
> Hmmm? Where should this be necessary? Do you want to modify the vector
> cell itself, or are you using this for "speed ups"? In the "speed-up"
> case: wouldn't SCM_VECTOR_SET do as well, given that the compiler can
> extract constant expressions from within loops?
In some cases no (GC manipulations of weak vectors), and in some cases
yes, but it would introduce lots of redtape: long lists of
SCM_VECTOR_SET calls. I'll review the cases once more.
> > * Will this patch be integrated into CVS? The FSF already has
> > disclaimers for me.
>
> I have not looked into the patch yet, but I think that the SCM_VECTOR_SET
> patch as you describe it is probably the right thing to do. I am not sure
> about the need for SCM_WRITABLE_VELTS, but I think we can discuss this
> one. In any case, it would be great if you could contact Michael Livshin.
I assume he is still on the list, reading all my musings? Also I
noticed that Greg Harvey did a lot of work on gengc, but apparently
that didn't work very well?
--
Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen/
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2002-07-15 18:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-14 22:14 GUILE GC -- Write barrier for vectors hanwen
2002-07-15 10:56 ` Miroslav Silovic
2002-07-15 11:00 ` Han-Wen Nienhuys
2002-07-15 11:36 ` Miroslav Silovic
2002-07-15 16:49 ` Dirk Herrmann
2002-07-15 18:22 ` Han-Wen Nienhuys [this message]
2002-07-15 20:07 ` Dirk Herrmann
2002-07-15 23:02 ` Han-Wen
2002-07-16 9:22 ` Han-Wen Nienhuys
2002-07-16 23:04 ` Dirk Herrmann
2002-07-16 23:26 ` Han-Wen
2002-07-17 21:53 ` Han-Wen
2002-07-19 23:48 ` Dirk Herrmann
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=15667.4827.763060.19585@meddo.cs.uu.nl \
--to=hanwen@cs.uu.nl \
--cc=guile-devel@gnu.org \
--cc=jantien@xs4all.nl \
/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).