From 7d013a64de1cada889f3db5da793a7b965e87ac1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 6 Mar 2006 06:18:43 +0000 Subject: * malloc/malloc.c (MALLOC_ALIGNMENT): Revert to (2 * SIZE_SZ) value. The correct value differs only on powerpc32, and for now changing it there is causing more trouble than it's worth. * malloc/arena.c: Add compile-time sanity check on padding calculation. 2006-03-05 Jakub Jelinek * malloc/arena.c (heap_info): Adjust the padding size if MALLOC_ALIGNMENT > 2 * SIZE_SZ. --- malloc/malloc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'malloc/malloc.c') diff --git a/malloc/malloc.c b/malloc/malloc.c index 99b55c8639..5fbd268fed 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -1,5 +1,5 @@ /* Malloc implementation for multiple threads without lock contention. - Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1996-2002,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Wolfram Gloger and Doug Lea , 2001. @@ -381,8 +381,15 @@ extern "C" { #ifndef MALLOC_ALIGNMENT +/* XXX This is the correct definition. It differs from 2*SIZE_SZ only on + powerpc32. For the time being, changing this is causing more + compatibility problems due to malloc_get_state/malloc_set_state than + will returning blocks not adequately aligned for long double objects + under -mlong-double-128. */ #define MALLOC_ALIGNMENT (2 * SIZE_SZ < __alignof__ (long double) \ ? __alignof__ (long double) : 2 * SIZE_SZ) +*/ +#define MALLOC_ALIGNMENT (2 * SIZE_SZ) #endif /* The corresponding bit mask value */ -- cgit v1.2.3