BSD 4_4 release
[unix-history] / usr / src / share / doc / psd / 05.sysman / 1.2.t
index d751003..c0a3b17 100644 (file)
@@ -1,8 +1,35 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1983, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\"
-.\"    @(#)1.2.t       6.9 (Berkeley) %G%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"    @(#)1.2.t       8.1 (Berkeley) 6/8/93
 .\"
 .sh "Memory management\(dg
 .NH 3
 .\"
 .sh "Memory management\(dg
 .NH 3
@@ -67,6 +94,7 @@ Protection and sharing options are defined in \fI<sys/mman.h>\fP as:
 #define MAP_FIXED      0x0020  /* map addr must be exactly as requested */
 #define MAP_INHERIT    0x0040  /* region is retained after exec */
 #define MAP_HASSEMAPHORE       0x0080  /* region may contain semaphores */
 #define MAP_FIXED      0x0020  /* map addr must be exactly as requested */
 #define MAP_INHERIT    0x0040  /* region is retained after exec */
 #define MAP_HASSEMAPHORE       0x0080  /* region may contain semaphores */
+#define MAP_NOPREALLOC 0x0100  /* do not preallocate space */
 .DE
 The cpu-dependent size of a page is returned by the
 \fIgetpagesize\fP system call:
 .DE
 The cpu-dependent size of a page is returned by the
 \fIgetpagesize\fP system call:
@@ -91,7 +119,7 @@ in which case the exact address will be used or the call will fail.
 The actual amount mapped is returned in \fIlen\fP.
 The \fIaddr\fP, \fIlen\fP, and \fIpos\fP parameters
 must all be multiples of the pagesize.
 The actual amount mapped is returned in \fIlen\fP.
 The \fIaddr\fP, \fIlen\fP, and \fIpos\fP parameters
 must all be multiples of the pagesize.
-A successful \fImmap\fP will \fImunmap\fP any previous mapping
+A successful \fImmap\fP will delete any previous mapping
 in the allocated address range.
 The parameter \fIprot\fP specifies the accessibility
 of the mapped pages.
 in the allocated address range.
 The parameter \fIprot\fP specifies the accessibility
 of the mapped pages.
@@ -118,6 +146,14 @@ or device to which swapping should be done.
 The MAP_INHERIT flag allows a region to be inherited after an \fIexec\fP.
 The MAP_HASSEMAPHORE flag allows special handling for
 regions that may contain semaphores.
 The MAP_INHERIT flag allows a region to be inherited after an \fIexec\fP.
 The MAP_HASSEMAPHORE flag allows special handling for
 regions that may contain semaphores.
+The MAP_NOPREALLOC flag allows processes to allocate regions whose
+virtual address space, if fully allocated,
+would exceed the available memory plus swap resources.
+Such regions may get a SIGSEGV signal if they page fault and resources
+are not available to service their request;
+typically they would free up some resources via \fIunmap\fP so that
+when they return from the signal the page
+fault could be successfully completed.
 .PP
 A facility is provided to synchronize a mapped region with the file
 it maps; the call
 .PP
 A facility is provided to synchronize a mapped region with the file
 it maps; the call