This is the mail archive of the gcc-patches@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]

Re: [patch]: new returns misaligned pointers


> Might I suggest, if we're going to decide to break things, 
> that instead of changing to always using BIGGEST_ALIGNMENT,
> that we use the alignment of the type being allocated?  Seems
> like that way we'd avoid wasting little bits of memory
> unnecessarily.
> 
But couldn't this still produce wrong alignments? What we really
want here is to align the header to the same alignment returned
by malloc().

Diego.


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