home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
- From: davidsen@ariel.crd.GE.COM (william E Davidsen)
- Newsgroups: comp.os.linux
- Subject: Re: I can't get mmap to work
- Message-ID: <1992Jul28.151159.22708@crd.ge.com>
- Date: 28 Jul 92 15:11:59 GMT
- References: <SHARMAN.92Jul28002859@sharman.Software.Mitel.COM>
- Sender: usenet@crd.ge.com (Required for NNTP)
- Reply-To: davidsen@crd.ge.com (bill davidsen)
- Organization: GE Corporate R&D Center, Schenectady NY
- Lines: 25
- Nntp-Posting-Host: ariel.crd.ge.com
-
- In article <SHARMAN.92Jul28002859@sharman.Software.Mitel.COM>, sharman@Software.Mitel.COM (Richard Sharman) writes:
-
- | buff1 = (caddr_t) memalign(0x1000, LEN1) ;
- [ ... ]
- | file1 = mmap(buff1, LEN1, PROT_READ, MAP_SHARED|MAP_FIXED, fd1, 0) ;
-
- Not having the docs for linux mmap(), I'm at a disadvantage here, but
- unless they are totally different from the BSD/V.4/Xenix flavor they
- adrs can be NULL to allow the system to use any part of your virtual
- address space it wants. That sounds like a really good place to start
- changing things. Then take that MAP_FIXED out of there and see if it
- works better.
-
- I have never thought of a good reason why someone would want to decide
- on the location of a mapped file, and it's always extra effort to find a
- place to do the map. Just pass in and address of ((caddr_t)0) and
- eliminate any problems caused by the address diddling you're doing.
-
- Ignore this if the current mmap() doesn't use the conventions other
- systems do...
- --
- bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
- It never ceases to amaze me that otherwise rational people, able to
- understand calculus, compound interest, and the income tax form, can
- continue to believe that poker is a game of chance.
-