From 320479713e9e05311dd631bcccc5a3cd71fc5721 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 2 May 2006 03:00:05 +0000 Subject: [PATCH] Document SHM_NORESERVE flag, new in 2.6.15. --- man2/shmget.2 | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/man2/shmget.2 b/man2/shmget.2 index b092cbb6f..4482ffe97 100644 --- a/man2/shmget.2 +++ b/man2/shmget.2 @@ -33,7 +33,7 @@ .\" Language and formatting clean-ups .\" Added notes on /proc files .\" -.TH SHMGET 2 2005-10-26 "Linux 2.6.14" "Linux Programmer's Manual" +.TH SHMGET 2 2006-05-02 "Linux 2.6.15" "Linux Programmer's Manual" .SH NAME shmget \- allocates a shared memory segment .SH SYNOPSIS @@ -110,12 +110,28 @@ argument of .BR open (2). Presently, the execute permissions are not used by the system. .TP -.B SHM_HUGETLB +.BR SHM_HUGETLB " (since Linux 2.6)" Allocate the segment using "huge pages." See the kernel source file .I Documentation/vm/hugetlbpage.txt for further information. -.\" FIXME 2.6.15 adds SHM_NORESERVE; document it. +.TP +.BR SHM_NORESERVE " (since Linux 2.6.15)" +This flag serves the same purpose as the +.BR mmap (2) +.B MAP_NORESERVE +flag. +Do not reserve swap space for this segment. +When swap space is reserved, one has the guarantee +that it is possible to modify the segment. +When swap space is not reserved one might get SIGSEGV upon a write +if no physical memory is available. +See also the discussion of the file +.I /proc/sys/vm/overcommit_memory +in +.Br proc (5). +.\" As at 2.6.17-rc2, this flag has no effect if SHM_HUGETLB was also +.\" specified. .PP When a new shared memory segment is created, its contents are initialised to zero values, and