From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: GUILE GC -- Write barrier for vectors Date: Mon, 15 Jul 2002 20:22:19 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <15667.4827.763060.19585@meddo.cs.uu.nl> References: <15665.63423.468913.715296@blauw.xs4all.nl> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1026757422 6377 127.0.0.1 (15 Jul 2002 18:23:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 15 Jul 2002 18:23:42 +0000 (UTC) Cc: guile-devel@gnu.org, jantien@xs4all.nl Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17UAVZ-0001ej-00 for ; Mon, 15 Jul 2002 20:23:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17UAV5-0001Py-00; Mon, 15 Jul 2002 14:23:11 -0400 Original-Received: from sunset.cs.uu.nl ([131.211.80.32] helo=mail.cs.uu.nl) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17UAUH-0001Ng-00 for ; Mon, 15 Jul 2002 14:22:21 -0400 Original-Received: from meddo.cs.uu.nl.cs.uu.nl (meddo.cs.uu.nl [131.211.80.91]) by mail.cs.uu.nl (Postfix) with ESMTP id 13CE945B0; Mon, 15 Jul 2002 20:22:19 +0200 (MET DST) Original-To: Dirk Herrmann In-Reply-To: X-Mailer: VM 7.03 under Emacs 21.2.1 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:804 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:804 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