-   Linux - Embedded & Single-board computer (
-   -   Creating more than one shared memory by a process (

anoopmenons 11-15-2009 08:58 AM

Creating more than one shared memory by a process
Hi all,

I am not sure whether more than one shared memory can be created by a process

I tried creating three shared memory by a process.
I am using shmget system call to create the shared memory.
The flag parameter what I am using is IPC_CREATE | 0666 for all the three.
I had also tried with IPC_CREATE | 0644

I am getting three different ids for shmget and three different pointers for shmat().But some junk value is coming in the shared memory created.

I doubt that the shared memory created is overlapping.Whether the flag parameter has to be changed.

Please clear my doubt


theNbomr 11-15-2009 12:11 PM

Your problem is probably buried in the details. How about posting the code that demonstrates the problem?
--- rod.

All times are GMT -5. The time now is 07:17 PM.