mmap

Larry Allen lwa at osf.org
Thu Feb 8 03:46:25 AEST 1990


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.  Addresses
beyond this (say, up to the next page boundary) may also
be valid, but you can't depend on that.

In any case, I'm not sure what your point about non-Posix
conformant systems is.  An application using mmap is not
Posix conformant.  If Posix is ever extended to include
mmap, presumably it will also include an interface to
get the page size.

Now, I think there *are* a couple of things about mmap
to which you could have raised valid objections (what happens
on a machine with multiple page sizes, such as the ETA-10?
what are the semantics for memory sharing on a multiprocessor
machine?  how do accesses to a file via mapping and accesses
to a file via the file system interact?)  But I don't see
the page size dependency as being a big problem.
						-Larry Allen
						 Open Software Foundation



More information about the Comp.unix.wizards mailing list