From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matthias Koeppe Newsgroups: gmane.lisp.guile.user Subject: Re: GC ?? Date: Wed, 03 Dec 2003 18:08:27 +0100 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1070471480 23141 80.91.224.253 (3 Dec 2003 17:11:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2003 17:11:20 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Dec 03 18:11:13 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARaWu-00019o-00 for ; Wed, 03 Dec 2003 18:11:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ARbT0-0007yy-3q for guile-user@m.gmane.org; Wed, 03 Dec 2003 13:11:14 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARbSE-0007y0-5r for guile-user@gnu.org; Wed, 03 Dec 2003 13:10:26 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARbRi-0007sd-AW for guile-user@gnu.org; Wed, 03 Dec 2003 13:10:25 -0500 Original-Received: from [141.44.75.40] (helo=merkur.math.uni-magdeburg.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ARbRh-0007sX-VE for guile-user@gnu.org; Wed, 03 Dec 2003 13:09:54 -0500 Original-Received: from gamma ([141.44.75.90] helo=gamma.math.uni-magdeburg.de) by merkur.math.uni-magdeburg.de with esmtp (Exim 4.10) id 1ARaUF-0004jY-00; Wed, 03 Dec 2003 18:08:27 +0100 Original-Received: (from mkoeppe@localhost) by gamma.math.uni-magdeburg.de (8.12.9+Sun/8.12.9/Submit) id hB3H8RPt011144; Wed, 3 Dec 2003 18:08:27 +0100 (MET) X-Authentication-Warning: gamma.math.uni-magdeburg.de: mkoeppe set sender to mkoeppe@mail.math.uni-magdeburg.de using -f Original-To: dv.praveen@skyworksinc.com In-Reply-To: (dv praveen's message of "Wed, 3 Dec 2003 18:28:22 +0530") User-Agent: Gnus/5.090024 (Oort Gnus v0.24) Emacs/21.3.50 (usg-unix-v) X-Warning: no 'abuse'-account in domain mail.math.uni-magdeburg.de (cf. RFC2142/4.) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2440 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2440 dv.praveen@skyworksinc.com writes: > + There would be 3 heaps for program that we write > a. C heap > b. C/Scheme heap > c. Scheme heap. > + The C heap would not be traced by GC. > + It is in the Scheme heap GC is going to trace. > > What is C/S heap for? I wrote "C/Scheme _stack_". The C and the Scheme side use the same stack. This is where nested function calls etc. are recorded. The Scheme objects are all stored in the Scheme heap. But pointers to Scheme objects can live in all three memory regions. When we say that the GC scans a memory region, it means that it scans it for pointers to live Scheme objects. This is also referred to as the "marking phase" of GC. After marking all live objects, the GC can collect (delete) all unmarked objects. > Andreas told about the function 'scm_permanent_object'. > Given an SCM object to this function where would it > get stored? Would the given value never be reached by > GC or it would be skipped by GC? As far as I know, scm_permanent_object simply registers its argument as another root from which the recursive marking procedure is started. > [about guardians] I have never used guardians, so I can't help here. -- Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe SWIG makes Guile wrappers for C/C++ libs -- http://www.swig.org ILISP does module-aware Emacs/Guile interaction -- http://sf.net/projects/ilisp _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user