🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #955

Re: mmap() system call

#955
From: Conor P. Cahill
Date: Tue, 02 Oct 1990 02:26
17 lines
1180 bytes
In article <5994@ge-dab.GE.COM> coleman@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 
Technical Details
Message-ID: <1990Oct02.022601.3946@virtech.uucp>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!virtech!cpcahil
References: <5994@ge-dab.GE.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!virtech!cpcahil
From: cpcahil@virtech.uucp (Conor P. Cahill)
Newsgroups: comp.unix.programmer
Subject: Re: mmap() system call
Message-ID: <1990Oct02.022601.3946@virtech.uucp>
Date: 2 Oct 90 02:26:01 GMT
References: <5994@ge-dab.GE.COM>
Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill)
Organization: Virtual Technologies Inc., Sterling VA
Lines: 17