From ecab701ed849403b1804407d85288c4cfbe7bff8 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Sat, 17 Feb 2007 17:55:45 +0000 Subject: Make _dl_malloc alignment arch configurable. From Atsushi Nemoto. --- ldso/ldso/ldso.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ldso/ldso/ldso.c') diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index cf8ba5f9d..8c6a5f27f 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -950,10 +950,11 @@ void *_dl_malloc(int size) _dl_malloc_addr += size; /* - * Align memory to 4 byte boundary. Some platforms require this, - * others simply get better performance. + * Align memory to DL_MALLOC_ALIGN byte boundary. Some + * platforms require this, others simply get better + * performance. */ - _dl_malloc_addr = (unsigned char *) (((unsigned long) _dl_malloc_addr + 3) & ~(3)); + _dl_malloc_addr = (unsigned char *) (((unsigned long) _dl_malloc_addr + DL_MALLOC_ALIGN - 1) & ~(DL_MALLOC_ALIGN - 1)); return retval; } -- cgit v1.2.3