about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--malloc/malloc.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index be91db9ff0..b135268610 100644
--- 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
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