Article View: comp.unix.programmers
Article #4question about using mmap
From: Elisabeth Freeman
Date: Thu, 28 Jan 1993 02:00
Date: Thu, 28 Jan 1993 02:00
21 lines
1158 bytes
1158 bytes
I'm a bit confused about using mmap - it's not clear what "fd"
in the man page refers to:
caddr_t mmap(addr, len, prot, flags, fd, off)
caddr_t addr;
size_t len;
int prot, flags, fd;
off_t off;
DESCRIPTION
mmap() establishes a mapping between the process's address
space at an address pa for len bytes to the memory object
represented by fd at off for len bytes.
What is this memory object pointed to by fd, and how do I define
fd? I want to map some pages created by valloc() to another
virtual address space. Can I use mmap() for this purpose?
Beth Freeman
freeman-elisabeth@cs.yale.edu
Technical Details
Message-ID:
<1k7enrINN3cc@TEDDY.SYSTEMSY.CS.YALE.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!gumby!yale!cs.yale.edu!not-for-mailShow Full Headers
Complete Article Headers
Newsgroups: comp.unix.programmers,comp.unix.wizards Path: arc1-ca.pugleaf.net!sparky!uunet!gumby!yale!cs.yale.edu!not-for-mail From: freeman-elisabeth@cs.yale.edu (Elisabeth Freeman) Subject: question about using mmap Message-ID: <1k7enrINN3cc@TEDDY.SYSTEMSY.CS.YALE.EDU> Lines: 23 Sender: news@cs.yale.edu (Usenet News) Nntp-Posting-Host: teddy.systemsy.cs.yale.edu Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158 Distribution: usa Date: Thu, 28 Jan 1993 02:00:27 GMT