Re: mprotect

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 23 Apr 1997 09:51:02 +0200 (MET DST)


John Alvord wrote:
>
> On Tue, 22 Apr 1997, Kai Schulte wrote:
> > that is aligned with a page boundary and extends the specified length to
> > the nearest multiple of the page size. Chances are that malloc will not
> > return a page-aligned pointer, so it will probably be invalid.
>
> You can alway get page alignment by asking for another page worth and
> doing a round operation to find the full page aligned address.

The malloc in my library returns page-aligned chunks when you ask for
more than half a page worth of data. I don't think I have gnu-malloc
in my lib yet, so it may be different if you're using something newer.

Roger.