[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GC ??
dv . praveen
Re: GC ??
Wed, 3 Dec 2003 18:28:22 +0530
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?
Matthias Koeppe <address@hidden>
03/12/2003 04:14 PM
To: D.V. Praveen/Intl/address@hidden
Subject: Re: GC ??
> 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
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
- GC ??, dv . praveen, 2003/12/02
- Re: GC ??, Andreas Rottmann, 2003/12/03
- Re: GC ??,
dv . praveen <=