LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Creating more than one shared memory by a process (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/creating-more-than-one-shared-memory-by-a-process-769282/)

anoopmenons 11-15-2009 09: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

Regards.
anoopmenon

theNbomr 11-15-2009 01: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:31 PM.