This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: x86_64: Should the -mavx* options affected __alignof__ (max_align_t)?


Hi,

On Thu, 2 Apr 2015, Jakub Jelinek wrote:

> > But it is dubious to require that, say, strdup ("example") returns a 
> > pointer which is 16-byte-aligned, too.
> > 
> > What is missing, it seems to me, is the qualification that for the 
> > pointer returned by malloc, the alignment requirements only of those 
> > types whose size does not exceed the malloc argument argument need to 
> > be considered.
> 
> Why?  The standard requires that it is aligned even for the smaller 
> sizes, and glibc malloc honors that.  Why do you want to change it all 
> of sudden?

Because it would increase waste even more when going from align-8 
to align-16 even for allocations for less than 8 byte.


Ciao,
Michael.


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