[PATCH] Replace divide and multiply with mask in sYSTRIm

Anton Blanchard anton@samba.org
Mon Jul 26 14:30:00 GMT 2010


Hi Andreas,

> > -  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.

Ouch, thanks for catching that. Will fix and resend.

Anton



More information about the Libc-alpha mailing list