[PATCH] use 8 byte alignment in _dl_malloc
Joakim Tjernlund
joakim.tjernlund at transmode.se
Sat Feb 17 16:10:27 UTC 2007
> -----Original Message-----
> From: uclibc-bounces at uclibc.org
> [mailto:uclibc-bounces at uclibc.org] On Behalf Of Atsushi Nemoto
> Sent: den 17 februari 2007 15:22
> To: ppanbura at yahoo.com
> Cc: uclibc at uclibc.org
> Subject: Re: [PATCH] use 8 byte alignment in _dl_malloc
>
> On Fri, 16 Feb 2007 09:44:57 -0800 (PST), Pandit Panburana
> <ppanbura at yahoo.com> wrote:
> > I agree 8 byte alignment is surely a safe bet but I am more
> > concern on platforms or environment that is sensitive to overhead
> > when they can do with less.
>
> OK, then how about this?
Nope
Either something like this:
Add this in a common header
#ifndef DL_MALLOC_ALIGN
#define DL_MALLOC_ALIGN 4
#endif
Then change
_dl_malloc_addr = (unsigned char *) (((unsigned long) _dl_malloc_addr + DL_MALLOC_ALIGN - 1) & ~(DL_MALLOC_ALIGN - 1));
Now you can change DL_MALLOC_ALIGN in your arch headers
or like your first patch.
either is fine by me.
Jocke
More information about the uClibc
mailing list