about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-04-03 09:43:10 -0700
committerPetr Baudis <pasky@ucw.cz>2010-05-12 02:27:16 +0200
commit64a532ff2c8cc914b1850a10ce7ca2a945c21098 (patch)
tree874f99161a704691cc8234bd4d0c84267cb81c21 /malloc
parent9914417d124400a5b4104a9d8ef8d46d1d464c6e (diff)
downloadglibc-64a532ff2c8cc914b1850a10ce7ca2a945c21098.tar.gz
glibc-64a532ff2c8cc914b1850a10ce7ca2a945c21098.tar.xz
glibc-64a532ff2c8cc914b1850a10ce7ca2a945c21098.zip
Fix set_max_fast in malloc.
(cherry picked from commit 991eda1ec17665ea0da247f8eabc6993d020ed8e)
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index f7226769f8..cdd24a02a0 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2351,7 +2351,8 @@ typedef struct malloc_chunk* mfastbinptr;
 */
 
 #define set_max_fast(s) \
-  global_max_fast = ((s) == 0)? SMALLBIN_WIDTH: request2size(s)
+  global_max_fast = (((s) == 0)						      \
+		     ? SMALLBIN_WIDTH: ((s + SIZE_SZ) & ~MALLOC_ALIGN_MASK))
 #define get_max_fast() global_max_fast