diff options
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r-- | malloc/malloc.c | 2 |
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) { |