[Gc] Proposed solution (was: Determine the requested size of a memory block)

Boehm, Hans hans.boehm at hp.com
Mon Aug 16 18:02:02 PDT 2010


Thanks.  But I don't see how this can possibly work.  Block headers describe all the objects associated with a block.  The objects in a block all have the same rounded size, but they don't all have the same requested size.  That's why debug allocation stores the size in an object header, not in a block header.

Hans

> -----Original Message-----
> From: gc-bounces at linux.hpl.hp.com [mailto:gc-bounces at linux.hpl.hp.com]
> On Behalf Of Christian Gudrian
> Sent: Monday, August 16, 2010 6:59 AM
> To: gc at linux.hpl.hp.com
> Subject: [Gc] Proposed solution (was: Determine the requested size of a
> memory block)
> 
> Hello!
> 
> I've implemented a new function called GC_ex_size which returns the
> requested size of a memory block.  A new field has been added to the
> struct hblkhdr which stores this information which otherwise would be
> lost.
> 
> A patch has been attached.
> 
> Christian



More information about the Gc mailing list