mmap
Doug Gwyn
gwyn at smoke.BRL.MIL
Thu Feb 8 15:25:21 AEST 1990
In article <3399 at paperboy.OSF.ORG> lwa at osf.org (Larry Allen) writes:
>If you want to map "len" bytes using mmap, you ask to
>map "len" bytes. If mmap is successful, it guarantees
>to return a pointer to an address a such that addresses
>a through a+len-1 are valid in your address space.
That doesn't mean they're safe to use! They could overlay program
variables. That is why I wanted a function to help determine page
alignment, so I could safely set up an array to use.
>In any case, I'm not sure what your point about non-Posix
>conformant systems is. An application using mmap is not
>Posix conformant.
It is the implementation that is not POSIX conformant, due to
sticking PAGESIZE gratuitously in <unistd.h> (according to SVID3).
More information about the Comp.unix.wizards
mailing list