From: Ulrich Drepper Date: Sat, 3 Apr 2010 16:43:10 +0000 (-0700) Subject: Fix set_max_fast in malloc. X-Git-Tag: fedora/glibc-2.11.1-7~1^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64a532ff2c8cc914b1850a10ce7ca2a945c21098;p=thirdparty%2Fglibc.git Fix set_max_fast in malloc. (cherry picked from commit 991eda1ec17665ea0da247f8eabc6993d020ed8e) --- diff --git a/ChangeLog b/ChangeLog index be91db9ff09..b1352686102 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-25 Andreas Schwab * sysdeps/posix/getaddrinfo.c (gaih_inet): Reset no_data before diff --git a/malloc/malloc.c b/malloc/malloc.c index f7226769f89..cdd24a02a02 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