This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Replace divide and multiply with mask in sYSTRIm
- From: Andreas Schwab <schwab at redhat dot com>
- To: Anton Blanchard <anton at samba dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 26 Jul 2010 15:04:55 +0200
- Subject: Re: [PATCH] Replace divide and multiply with mask in sYSTRIm
- References: <20100726043651.GE29316@kryten> <20100726072109.GA1696@kryten>
Anton Blanchard <anton@samba.org> writes:
> - extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz;
> + extra = (top_size - pad - MINSIZE + (pagesz-1)) & ~(pagesz-1);
That's not the same. Your version is off by pagesz.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."