From 23c9590997f0c08dcdf7e38351a1df3e3a21e790 Mon Sep 17 00:00:00 2001 From: Manfred Spraul Date: Sat, 3 May 2014 13:16:17 +0200 Subject: [PATCH] shmget.2: Clarify SHMALL The default for SHMALL is a limit of 8 GB, regardless of PAGE_SIZE. The current documentation does not mention that and is therefore more difficult to understand than necessary. Signed-off-by: Manfred Spraul Signed-off-by: Michael Kerrisk --- man2/shmget.2 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/man2/shmget.2 b/man2/shmget.2 index 146974a5d..14ed0bbe3 100644 --- a/man2/shmget.2 +++ b/man2/shmget.2 @@ -288,7 +288,14 @@ Since Linux 2.4, the default value for this limit is SHMMAX / PAGE_SIZE * (SHMMNI / 16) -Assuming a 4kB page size, this formula yields the value 2^21 (2,097,152). +If +.B SHMMAX +and +.B SHMMNI +are not modified, this yields a limit for the +total memory used by all shared memory segments of 8 GB: +With a 4kB page size, this formula yields the value 2^21 (2,097,152), +with 8kB page size, it yields 2^20 (1048576). On Linux, this limit can be read and modified via .IR /proc/sys/kernel/shmall .