[Q]: shared memory limits

Alexander L. Belikoff (abel@bfr.co.il)
14 Jan 1998 15:32:25 +0200


Hello everybody,

I've got a quick question regarding the shmem limits:

According to the Linux kernel (2.0.30 on i386):

Max segment size (SHMMAX) 16Mb
Max number of seg's system-wide (SHMMNI) 128
Max total shared memory (SHMALL) ~16Gb

Max number of shared segments per process is the same is SHMMNI.

Now, one of our programs crashes when we try to allocate more than
4Mb. According to the shmget(2) (manpage reads "Linux 0.99.11/November
28, 1993"):

SHMMAX Maximum size in bytes for a shared memory seg-
ment: implementation dependent (currently 4M).

...which is consistent with the behavior we see, but not with the
kernel source. So, I cannot just assume that the manpage is
obsolete...

The kernel in question is 2.0.30 (with various patches) on both x86
and AXP. There is 128Mb of RAM and plenty of swap space. So why
doesn't it allow getting more than 4Mb???

Thanks in advance,

PS. Please CC me your response. This is the 2nd time I'm getting
misteriously dropped from the list, so I'll have to re-subscribe again
in the near future. Thanks.

-- 
Alexander L. Belikoff
Berger Financial Research Ltd.
abel@bfr.co.il