What am I doing wrong with /proc/sys/kernel/shmmax?

Fredrick Meunier (fme@fmsc.co.uk)
Wed, 03 Mar 1999 15:03:01 +0000


Hi all,
I am using Linux 2.2.2 on a 512Mb PII machine with 1Gb swap.
I do a
echo 335544320 > /proc/sys/kernel/shmmax
I can now create a shared memory segment 250Mb in size, and write data
into it. When I start reading the memory written I start getting
corrupted (-1 and 0 written semi-randomly) then zeroed memory from about
9171328 bytes into the shared memory segment I have allocated. I do not
get these problems if I instead edit include/asm-i386/shmparam.h and
change SHMMAX to 0x10000000 (although I realise that that may not be a
safe change), recompile and install the resultant kernel. What do I need
to do to actually change the value of shmmax and have it work?

Thanks for any help,
Fred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/