home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / programm / 6058 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  1.1 KB

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