home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / wizards / 5658 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.1 KB  |  36 lines

  1. Newsgroups: comp.unix.programmers,comp.unix.wizards
  2. Path: sparky!uunet!gumby!yale!cs.yale.edu!not-for-mail
  3. From: freeman-elisabeth@cs.yale.edu (Elisabeth Freeman)
  4. Subject: question about using mmap
  5. Message-ID: <1k7enrINN3cc@TEDDY.SYSTEMSY.CS.YALE.EDU>
  6. Lines: 23
  7. Sender: news@cs.yale.edu (Usenet News)
  8. Nntp-Posting-Host: teddy.systemsy.cs.yale.edu
  9. Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158
  10. Distribution: usa
  11. Date: Thu, 28 Jan 1993 02:00:27 GMT
  12.  
  13. I'm a bit confused about using mmap - it's not clear what "fd"
  14. in the man page refers to:
  15.  
  16.  
  17.      caddr_t mmap(addr, len, prot, flags, fd, off)
  18.      caddr_t addr;
  19.      size_t len;
  20.      int prot, flags, fd;
  21.      off_t off;
  22.  
  23. DESCRIPTION
  24.      mmap() establishes a mapping between the  process's  address
  25.      space  at  an  address pa for len bytes to the memory object
  26.      represented by fd at off for len bytes.  
  27.  
  28. What is this memory object pointed to by fd, and how do I define
  29. fd?   I want to map some pages created by valloc() to another
  30. virtual address space.  Can I use mmap() for this purpose?
  31.  
  32. Beth Freeman
  33. freeman-elisabeth@cs.yale.edu
  34.  
  35.  
  36.