[Gc] Proposed solution

Boehm, Hans hans.boehm at hp.com
Tue Aug 17 11:02:22 PDT 2010


I think the overhead for small objects would be too high if you just added the size to every object.

It might be OK to add an option to only round the size up to the next granule (normally 2*sizeof(void *)), so that the size is that accurate.  That would add some overhead for small heaps, but would probably be OK for large ones.  It wouldn't give you byte accuracy for the size.  And it would be a little tricky to get this right.

Hans

> -----Original Message-----
> From: Christian Gudrian [mailto:christian at gudrian.org]
> Sent: Tuesday, August 17, 2010 12:10 AM
> To: Boehm, Hans
> Cc: gc at linux.hpl.hp.com
> Subject: Re: [Gc] Proposed solution
> 
> Am 17.08.2010 03:02, schrieb Boehm, Hans:
> 
> > But I don't see how this can possibly work.
> 
> You're right, of course.
> 
> > That's why debug allocation stores the size in an object header, not
> > in a block header.
> 
> So given my current motivation is there any chance for adding something
> like an object header into the non-debug version of the collector?
> 
> Christian



More information about the Gc mailing list