From 991eda1ec17665ea0da247f8eabc6993d020ed8e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 3 Apr 2010 09:43:10 -0700 Subject: [PATCH] Fix set_max_fast in malloc. --- ChangeLog | 4 ++++ malloc/malloc.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dafce4dc80..f61697c1b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-03 Ulrich Drepper + + * malloc/malloc.c (set_max_fast): Fix computation of the value. + 2010-03-30 David S. Miller * sysdeps/unix/sysv/linux/mmap64.c (__mmap64): Fix diff --git a/malloc/malloc.c b/malloc/malloc.c index 6993aea0ec..784919e4bd 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -2350,7 +2350,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