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