Path: utzoo!attcan!uunet!jarthur!brutus.cs.uiuc.edu!samsung!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!paperboy!osf.org!lwa From: lwa@osf.org (Larry Allen) Newsgroups: comp.unix.wizards Subject: Re: mmap Message-ID: <3399@paperboy.OSF.ORG> Date: 7 Feb 90 16:46:25 GMT References: <12087@smoke.BRL.MIL> <22368@adm.BRL.MIL> Sender: news@OSF.ORG Reply-To: lwa@osf.org (Larry Allen) Organization: Open Software Foundation Lines: 22 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