Hi,
I am having some trouble with how Linux is dealing with shared memory. I am
using RedHat 6.0 based kernel.
int main()
{
shmget(MYFIXED_ID, ...); // create 1 Meg segment
shmat(...);
while (1) { sleep(30); };
}
We have around 5 megs of RAM free. One would think that one can run more
than 5 copies of this program because memory is shared.
But what we are finding is that after 5-6 copies of this program, the system
runs out of memory. When I verify if all the programs are accessing the same
memory, they do! So the memory is actually shared, but the usage is not!!!
Can anyone explain this? I found this problem to be true even on RedHat 6.1
workstation by creating a sample program which allocates 30Megs of shared
memory at a time.
Thanks
Pawan
[EMAIL PROTECTED]
--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.