From: jjohnstn Date: Tue, 21 Aug 2001 20:23:15 +0000 (+0000) Subject: 2001-08-21 Jeff Johnston X-Git-Tag: cygwin_daemon_merge_HEAD~3516 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=82967e527b3ac5074853c0d9014f15a69068a0ec;p=pf3gnuchains%2Fpf3gnuchains4x.git 2001-08-21 Jeff Johnston * libc/stdlib/mallocr.c [!defined(MALLOC_ALIGNMENT)]: Add conditional for SIZE_SZ so that alignment ends up a minimum of 8. --- diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 51a02854c6..d4e94e4957 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2001-08-21 Jeff Johnston + + * libc/stdlib/mallocr.c [!defined(MALLOC_ALIGNMENT)]: Add conditional + for SIZE_SZ so that alignment ends up a minimum of 8. + Mon Aug 13 22:26:01 2001 Christopher Faylor * libc/include/machine/setjmp.h: Protect sigsetjmp/siglongjmp macro diff --git a/newlib/libc/stdlib/mallocr.c b/newlib/libc/stdlib/mallocr.c index d269dd390c..fb9b7d8b5f 100644 --- a/newlib/libc/stdlib/mallocr.c +++ b/newlib/libc/stdlib/mallocr.c @@ -1384,7 +1384,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define SIZE_SZ (sizeof(INTERNAL_SIZE_T)) #ifndef MALLOC_ALIGNMENT #define MALLOC_ALIGN 8 -#define MALLOC_ALIGNMENT (SIZE_SZ + SIZE_SZ) +#define MALLOC_ALIGNMENT (SIZE_SZ < 4 ? 8 : (SIZE_SZ + SIZE_SZ)) #else #define MALLOC_ALIGN MALLOC_ALIGNMENT #endif