Sat, 10 May 1997 09:00:27 -0700
Christopher J. Vogt wrote:
>My only opinion on this is that I want to be sure to be able to *NOT* use
>Similarly, wrt GC, I want to be able to allocate/deallocate memory myself
>on occasion, and not have the GC involved. Of course I want the GC
>avaiable, and used on most of my objects.
FWIW, here's an excerpt of docs about the way objects interact with GC under
the Gambit-C Scheme compiler. Among the interesting bits is the concept of
having different GC algorithms responsible for different memory stores:
Memory allocated Scheme objects can be allocated using one of three
These objects, called 'permanent objects' for short, are never
moved or reclaimed, and all pointers to memory allocated
objects they contain must point to permanent objects. As a
consequence, the GC does not have to scan permanent objects.
Permanent objects can be allocated on the C heap, but they are
typically allocated in C global variables and structures that are
set up when the program starts up or when a module is dynamically
Still dynamically allocated:
These objects, called 'still objects' for short, are allocated on
the C heap. Still objects are never moved but they can be reclaimed by
the GC. A mark-and-sweep GC is used to garbage-collect still objects.
Movable dynamically allocated:
These objects, called 'movable objects' for short, are allocated
in an area of memory that is managed by a compacting GC. The GC can
move and reclaim movable objects.
The views expressed are mine alone,
unless you agree with me.