unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: dv.praveen@skyworksinc.com
Subject: Re: GC ??
Date: Wed, 3 Dec 2003 18:28:22 +0530	[thread overview]
Message-ID: <OFE21E3C0D.F8AAF615-ON65256DF1.0044BFAF-65256DF1.00474300@ad.skynet> (raw)

hi Matthias,
I am trying to understand Andreas and your mail.
I still have few questions.

+ 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?
Is it in the Scheme heap guile creates 'heap segments'
for storing Scheme 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?

What is the difference b/w storing a SCM value using
scm_permanent_object and protecting using guardian proc
returned by scm_make_guardian? Why doesn't guardian proc
work for the program I wrote?

Can you please explain?

regards,
Praveen
 




Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
03/12/2003 04:14 PM

 
        To:     D.V. Praveen/Intl/Skyworks@Skymail
        cc:     guile-user@gnu.org@SMTP@Exchange
        Subject:        Re: GC ??

dv.praveen@skyworksinc.com writes:

> My question is still unasnwered.  Shouldn't the
> garbage collector attend all the globals and the
> recurse on the internal scm objects during the
> trace operation?

The garbage collector only scans the Scheme heap and the C/Scheme
stack, but neither the global C data nor the C heap.  I think the
rationale is that it would be very expensive to scan these memory
regions because they may be very large and contain only very few
Scheme objects.  Moreover, they may contain many "false pointers" that
look like Scheme objects, which would make garbage collection
ineffective. 

Therefore one needs to manually protect Scheme objects that are stored
in these memory regions from being garbage collected.

-- 
Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe




_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


             reply	other threads:[~2003-12-03 12:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03 12:58 dv.praveen [this message]
2003-12-03 17:08 ` GC ?? Matthias Koeppe
     [not found] <200312030720.hB37Khv7022012@smtp1.urprovider.com>
2003-12-03 11:25 ` Andreas Rottmann
  -- strict thread matches above, loose matches on Subject: below --
2003-12-03  7:20 dv.praveen
2003-12-03 10:44 ` Matthias Koeppe
2003-12-03 12:45   ` Stephen Compall
2003-12-03 15:55     ` Ludovic Courtès
2003-12-03 17:04     ` Matthias Koeppe
2003-12-02 11:59 dv.praveen
2003-12-02 14:32 ` Andreas Rottmann

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=OFE21E3C0D.F8AAF615-ON65256DF1.0044BFAF-65256DF1.00474300@ad.skynet \
    --to=dv.praveen@skyworksinc.com \
    /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).