1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

* 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  <jakub@redhat.com>

	* malloc/arena.c (heap_info): Adjust the padding size if
	MALLOC_ALIGNMENT > 2 * SIZE_SZ.
This commit is contained in:
Roland McGrath
2006-03-06 06:18:43 +00:00
parent 182ed12e71
commit 7d013a64de
4 changed files with 36 additions and 7 deletions

View File

@ -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 <wg@malloc.de>
and Doug Lea <dl@cs.oswego.edu>, 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 */