]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix set_max_fast in malloc.
authorUlrich Drepper <drepper@redhat.com>
Sat, 3 Apr 2010 16:43:10 +0000 (09:43 -0700)
committerPetr Baudis <pasky@ucw.cz>
Wed, 12 May 2010 00:27:16 +0000 (02:27 +0200)
(cherry picked from commit 991eda1ec17665ea0da247f8eabc6993d020ed8e)

ChangeLog
malloc/malloc.c

index be91db9ff09d0089316b6de70557e01724645e1a..b1352686102f34317f491c744fdaee1d63b4e4c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-03  Ulrich Drepper  <drepper@redhat.com>
+
+       * malloc/malloc.c (set_max_fast): Fix computation of the value.
+
 2010-03-25  Andreas Schwab  <schwab@redhat.com>
 
        * sysdeps/posix/getaddrinfo.c (gaih_inet): Reset no_data before
index f7226769f896c6b852f51f2b4a4cdf5c37e35086..cdd24a02a02fe2e1fc27402172ae12ff3a120384 100644 (file)
@@ -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