From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.bugs Subject: Re: Latent bugs? Date: 28 Dec 2002 10:35:56 -0800 Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: References: <0212280430350A.21210@locke.free-expression.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1041100897 4013 80.91.224.249 (28 Dec 2002 18:41:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 28 Dec 2002 18:41:37 +0000 (UTC) Cc: bug-guile@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18SLtv-00012B-00 for ; Sat, 28 Dec 2002 19:41:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18SLtQ-0004Bk-02 for guile-bugs@m.gmane.org; Sat, 28 Dec 2002 13:41:04 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18SLtL-0004BF-00 for bug-guile@gnu.org; Sat, 28 Dec 2002 13:40:59 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18SLtJ-0004AM-00 for bug-guile@gnu.org; Sat, 28 Dec 2002 13:40:58 -0500 Original-Received: from [209.77.185.85] (helo=lumo.pacujo.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18SLtJ-00049K-00 for bug-guile@gnu.org; Sat, 28 Dec 2002 13:40:57 -0500 Original-Received: (from marko@localhost) by lumo.pacujo.net (8.11.6/8.11.6/SuSE Linux 0.5) id gBSIZv121068; Sat, 28 Dec 2002 10:35:57 -0800 Original-To: Lynn Winebarger In-Reply-To: <0212280430350A.21210@locke.free-expression.org> Original-Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:605 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:605 Lynn Winebarger : > On Saturday 28 December 2002 03:49, Marko Rauhamaa wrote: > > > > return scm_list_2(scm_cons(scm_long2num(old_timer.it_interval.tv_sec), > > scm_long2num(old_timer.it_interval.tv_usec)), > > scm_cons(scm_long2num(old_timer.it_value.tv_sec), > > scm_long2num(old_timer.it_value.tv_usec))); > > > > If I understand it correctly, this statement contains several > > allocations, each of which can potentially trigger garbage collection > > and delete any of the intermediate results. > > The code above, though it is not explicit, will store the > intermediate return values (references) on the stack, where the > garbage collector will see them (and thus not free the newly created > object). It's just how the traditional model of a C machine works. I took a glance at gc_os_dep.c and I was surprised. It appears the GC actually sweeps through all data segments, the stack segment and CPU registers and heuristically locates pointers into the heap. I've used that technique myself before, but I wouldn't have thought that was an effective way of implementing a Lisp machine. The Guile manual doesn't state that basically all writable memory of a process participates in GC: http://www.gnu.org/software/guile/docs/guile-ref/Memory-Management.html#Memory%20Management Marko -- Marko Rauhamaa mailto:marko@pacujo.net http://pacujo.net/marko/ _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile