[KLUG Programming] Pthreads problem

Peter Buxton programming@kalamazoolinux.org
Thu, 1 Jan 2004 03:55:20 -0500


On Wed, Dec 31, 2003 at 12:19:49PM -0500, Alan Mink was only escaped
   alone to tell thee:

> Mine has the same! Is this what Threads uses for shared memory limits?

Since a LinuxThread under 2.4.18 is just a lightweight process (LWP),
this applies to threads and processes equally.

> What does it do if you exceed these limits? I didn't see an warnings
> or error msgs.

Did syslogd or klogd spit out any info?

> Is this just some default constant that I can change?  Does it have
> any impact elsewhere? Are there any real limits for this other than
> main memory size?

echo 50331648 > /proc/sys/kernel/shmmax

Reading ./2.6.0/Documentation/sysctl/kernel.txt:

    shmmax:

    This value can be used to query and set the run time limit on the
    maximum shared memory segment size that can be created.  Shared
    memory segments up to 1Gb are now supported in the kernel.  This
    value defaults to SHMMAX.

SHMMAX is the cpp #define rule in the kernel source that sets shmmax to
33554432.

Check the 2.4 kernel documentation. 1GB may be 2.6-specific.

-- 
I will not eat oysters. I want my food dead.
Not sick, not wounded; dead. -- Woody Allen