home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / linux / 6867 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.7 KB

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