aboutsummaryrefslogtreecommitdiff
path: root/malloc/malloc.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2010-08-16 23:06:55 -0700
committerUlrich Drepper <drepper@redhat.com>2010-08-16 23:06:55 -0700
commitb9b42ee01c935133c025d3b20102c1e490354e8e (patch)
tree939013de87dc7f89fcddd55e928b5e9fb2a19a3d /malloc/malloc.c
parent004c737f7b097026c4231fbc3644e9450f9e087e (diff)
downloadglibc-b9b42ee01c935133c025d3b20102c1e490354e8e.tar
glibc-b9b42ee01c935133c025d3b20102c1e490354e8e.tar.gz
glibc-b9b42ee01c935133c025d3b20102c1e490354e8e.tar.bz2
glibc-b9b42ee01c935133c025d3b20102c1e490354e8e.zip
Replace divide and multiply with mask in sYSTRIm
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r--malloc/malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 9594be4cbd..53ee1ccb87 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3466,7 +3466,7 @@ static int sYSTRIm(pad, av) size_t pad; mstate av;
top_size = chunksize(av->top);
/* Release in pagesize units, keeping at least one page */
- extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz;
+ extra = (top_size - pad - MINSIZE - 1) & ~(pagesz - 1);
if (extra > 0) {