Skip to contentSkip to conversation

shmget.2: SHMALL & kernel version inconsistency ?

DISCUSSION Simon Paillard 2 participants 2 messages Apr 27, 2014 – Apr 28, 2014 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hi,

From shmget.2:
=======================================================================
SHMALL System wide maximum of shared memory pages. Since Linux 2.2,
the default value for this limit is

SHMMAX / PAGE_SIZE * (SHMMNI / 16)

Assuming a 4kB page size, this formula yields (since Linux 2.4) the value 2^20 (2,097,152).

On Linux, this limit can be read and modified via /proc/sys/ker‐ nel/shmall.
=======================================================================

Linux 2.2 or 2.4 ?

I understand from lxr contant this is actually 2.4.
http://lxr.linux.no/#linux-old+v2.2.0/include/linux/shm.h#L53
http://lxr.linux.no/#linux-old+v2.4.0/include/linux/shm.h#L15

Signature · 5 lines
Simon Paillard
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive
Quoted 16 lines · Simon Paillard

Hi,

Quoted 1 line

From shmget.2:

=======================================================================
SHMALL System wide maximum of shared memory pages. Since Linux 2.2,
the default value for this limit is

SHMMAX / PAGE_SIZE * (SHMMNI / 16)

Assuming a 4kB page size, this formula yields (since Linux 2.4) the value 2^20 (2,097,152).

On Linux, this limit can be read and modified via /proc/sys/ker‐ nel/shmall.
=======================================================================

Quoted 5 lines

Linux 2.2 or 2.4 ?

I understand from lxr contant this is actually 2.4.
http://lxr.linux.no/#linux-old+v2.2.0/include/linux/shm.h#L53
http://lxr.linux.no/#linux-old+v2.4.0/include/linux/shm.h#L15

Thanks, Simon. Yes, it should have been 2.4. The fix is in Git.

Cheers,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html