[Gc] Re: C++ API enhancement proposal

skaller skaller at users.sourceforge.net
Mon Oct 15 06:45:13 PDT 2007


On Mon, 2007-10-15 at 07:02 -0500, Larry Evans wrote:
> On 05/11/07 13:18, skaller wrote:
> [snip]
> > BTW: you might look at how Felix does this. The call for gc object
> > construction is:
> > 
> > 	new (gc, shape<X>) X(args)
> > 
> > 
> > Here 'gc' is the collector, and 'shape<X>' is the data needed by the
> > collector to find the pointers in an X. Clearly in your proposal,
> > this information is synthesised by the compiler for an exact collector,
> > or simply not necessary for a conservative one.
> 
> So in Felix, is shape<X> determined by the compiler?  I've not
> heard of a c++ compiler which provides this.

Yes, it's provided by the compiler. 

I believe there is a hook for walking some data structures
for boehm gc, but haven't spotted it yet. Can this be done?
i.e. make bdrgc more precise?

I also heard a bitmap can be supplied, but that won't
work for arrays .. as I discovered variable length arrays
require direct support in the gc.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


More information about the Gc mailing list