[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ extension and garbage collection



On Tue, 26 Mar 2002, Matthew Flatt wrote:
> The implementation of MrEd doesn't want C++ to be "protected" from the
> garbage collector; for a variety of reasons (not performance :), MrEd's
> C++ objects are meant to be GCed.

The garbage collector's (Boehm-Demers-Weiser?) mark algorithm
must know about MrEd's C++ objects.  How?  Does it start with
the BSS space and just follow every four byte boundary as if it
were a pointer?  Or does MrEd somehow inform the GC about its
global objects and the mark algorithm follows pointers or anything
that might be a pointer from there?

Can I do something in my C++ code to inform the GC about my objects,
so that they aren't collected?

Thanks,

Ron
stanonik@cogsci.ucsd.edu