Path: utzoo!attcan!uunet!samsung!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: mmap Message-ID: <12097@smoke.BRL.MIL> Date: 8 Feb 90 04:25:21 GMT References: <12087@smoke.BRL.MIL> <22368@adm.BRL.MIL> <3399@paperboy.OSF.ORG> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <3399@paperboy.OSF.ORG> lwa@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 (according to SVID3).