mmap() system call
Conor P. Cahill
cpcahil at virtech.uucp
Tue Oct 2 12:26:01 AEST 1990
In article <5994 at ge-dab.GE.COM> coleman at sundae9.DAB.GE.COM (Richard Coleman) writes:
>I was looking at the system call mmap(). I not sure what
>the purpose of this system call is. Could someone help.
On systems that support it, it allows you to map a portion (or all) of a
file into your memory space.
This allows you to change the contents of the file by simply assigning
to the data area in your mapped area. For example, if mmptr is a pointer
to the memory mapped region, memset(mmptr,'\0',512); will clear the first
512 bytes of the file.
--
Conor P. Cahill (703)430-9247 Virtual Technologies, Inc.,
uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160
Sterling, VA 22170
More information about the Comp.unix.programmer
mailing list