PATCH: malloc.c cleanups

Wolfram Gloger wmglo@dent.med.uni-muenchen.de
Tue Jul 18 01:23:00 GMT 2000


Hello,

> These are preparatory cleanups for BP support.
> No build regressions.  No binary changes.
> 
> OK?

They all look just fine to me, except for this:

> -#define next_bin(b)    ((mbinptr)((char*)(b) + 2 * sizeof(mbinptr)))
> -#define prev_bin(b)    ((mbinptr)((char*)(b) - 2 * sizeof(mbinptr)))
> +#define next_bin(b)    ((mbinptr)((char*)(b) + 2 * sizeof(((arena*)0)->av[0])))
> +#define prev_bin(b)    ((mbinptr)((char*)(b) - 2 * sizeof(((arena*)0)->av[0])))

which I don't really consider an improvement.

Do changes like these really make a difference for BP, i.e. can more
errors be detected?  If yes, that's pretty cool.

Regards,
Wolfram.


More information about the Libc-hacker mailing list