This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch]: new returns misaligned pointers
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: [patch]: new returns misaligned pointers
- From: Diego Novillo <dnovillo at cygnus dot com>
- Date: Fri, 12 Nov 1999 17:53:37 -0700 (MST)
- cc: Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
> 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.