diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-02-17 17:55:45 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-02-17 17:55:45 +0000 |
commit | ecab701ed849403b1804407d85288c4cfbe7bff8 (patch) | |
tree | b791cc1f61c3c3a2945aaa20f533a58ff1f49de4 /ldso/ldso/ldso.c | |
parent | 9da4b6afffd849f85c4892a2016c899358db99af (diff) |
Make _dl_malloc alignment arch configurable.
From Atsushi Nemoto.
Diffstat (limited to 'ldso/ldso/ldso.c')
-rw-r--r-- | ldso/ldso/ldso.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; } |