Subject: Re: MAP_FILE in /usr/include/sys/mman.h
To: current-users <>
From: Scott Reynolds <scottr@Plexus.COM>
List: current-users
Date: 07/20/1994 10:26:01
cgd> MAP_FILE shouldn't be used; it's been deprecated.  mmap() now
cgd> considers things files, unless specified otherwise.

Well, OK, I'll buy this, but there are two things that point to the need 
for MAP_FILE... in /usr/include/sys/mman.h there *is* a reference to the 
non-existent MAP_FILE value, and in mmap(2) it's explicitly named.  If 
the default behavior is MAP_FILE, then it seems that both the .h and 
manpage need to be changed.  Also it's not very clear exactly what should 
be used in place of something like this:

base = (pointer)mmap(..., MAP_FILE, ...);

From looking at mman.h I would suspect that it's now "proper" to specify 
one of MAP_SHARED, MAP_PRIVATE, or MAP_COPY.  Is this correct?  If none of 
these is specified, which, if any, is the default?  Not being very 
familiar with the internals of the vm system, things got pretty hairy 
when I tried to figure out for myself in vm/vm_mmap.c...