1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

Replace divide and multiply with mask in sYSTRIm

This commit is contained in:
Anton Blanchard
2010-08-16 23:06:55 -07:00
committed by Ulrich Drepper
parent 004c737f7b
commit b9b42ee01c
3 changed files with 11 additions and 6 deletions

View File

@@ -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) {