diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2001-08-21 20:23:16 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2001-08-21 20:23:16 +0000 |
commit | e82676644599cafc60778bf27c3c90df1cdf867c (patch) | |
tree | 0de15fbf4b6becf12f312d7ecd2efaab51adfad3 /newlib | |
parent | 75394d4a2683b5ff859364fb7130e2e08820c91e (diff) | |
download | newlib-e82676644599cafc60778bf27c3c90df1cdf867c.zip newlib-e82676644599cafc60778bf27c3c90df1cdf867c.tar.gz newlib-e82676644599cafc60778bf27c3c90df1cdf867c.tar.bz2 |
2001-08-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/mallocr.c [!defined(MALLOC_ALIGNMENT)]: Add conditional
for SIZE_SZ so that alignment ends up a minimum of 8.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/stdlib/mallocr.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 51a0285..d4e94e4 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2001-08-21 Jeff Johnston <jjohnstn@redhat.com> + + * 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 <cgf@cygnus.com> * libc/include/machine/setjmp.h: Protect sigsetjmp/siglongjmp macro diff --git a/newlib/libc/stdlib/mallocr.c b/newlib/libc/stdlib/mallocr.c index d269dd3..fb9b7d8 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 |