This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFD - Support for memory tagging in GLIBC


Paul Eggert <eggert@cs.ucla.edu> writes:
> SPARC ADI has a 64-byte granule, and Richard's email said there could be an 
> efficiency issue there since I assume malloc's block header is smaller than 64 
> bytes.

The malloc overhead - in general - for allocated and in-use chunks - is
sizeof(void *).

However, the alignment requirements means that the smallest chunk we can
work with is typically 4*sizeof(void*) but that's *not* aligned to a
16-byte boundary!  The *second* word (the start of the user area) is the
alignment point.

So it sounds like for ADI the chunk and its chunk header might be in
different granules, and the chunk header couldn't be protected from
buffer overruns since it's always in the same granule as the end of the
previous chunk.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]