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: [PATCH] malloc.c fix for MALLOC_ALIGN_MASK tests.


On Thu, 2005-09-15 at 11:43 -0700, an unknown sender wrote:
> Peter Bergner wrote:
> > I'm sorry if I wasn't clear enough.  The problem occurs on arches that
> > define MALLOC_ALIGNMENT > 2*SIZE_SZ.
> 
> There is only one (and a pretty useless one).  And this does not warrent
> making the checks more expensive.  I rather comment out all these checks
> for the affected *one* architecture.

I'm curious, how does the patch make the checks more expensive?
I could see they'd be more expensive if we had to call chunk2mem
to get the mem pointers, but that's not the case here, since the
mem pointers are formal parameters to the three affected routines.

In the case you still prefer to comment out the checks instead of
accepting the patch, would it be better to #ifdef the code out
whenever MALLOC_ALIGNMENT != 2*SIZE_SZ rather than testing for a
particular architecture in case another arch or user attempts to
use a larger MALLOC_ALIGNMENT?

Peter



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