I call shmget many times in my program, to get shm of of average size 85840 bytes. I obtain about 32771 shm ok, then shmget doesn't return a shm, but the error: "No space left on device".

I have increased the kernel limits to:

$ sysctl -A|grep shm
kernel.shmmax = 33554432
kernel.shmall = 1677721600
kernel.shmmni = 409600


But still get the issue. Why?

Do I have to put something into /etc/security/limits.conf too? I only have
"user             -       nofile          1000000"
because the program also opens about as many files as shms.

This is the output of free

$ free
          total       used       free     shared    buffers     cached
Mem:       8150236    7261676     888560          0     488100    3270792
-/+ buffers/cache:    3502784    4647452 
Swap:     12287992     554692   11733300


And ipcs

$ ipcs -lm                                                                         

------ Shared Memory Limits --------
max number of segments = 409600
max seg size (kbytes) = 1638400
max total shared memory (kbytes) = 6710886400
min seg size (bytes) = 1


Since I assume shm is capable of being swapped out, there should be enough space.


Question: Practical use and applications of improper integrals
Answer: Whenever I think of improper integrals, and their applications my mind remembers all the physics based equations. Given position at all points, we can use an indefinite integral to find the speed and acceleration at all points. We can apply this rule of rates to pretty much anything to find out total work, or total volume of anything. Additionally a lot of the more intricate integrals are applicable to electromagnetic fields and how they interact with other things, and their more easily formula conforming properties.