Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-15-2009, 09:23 AM   #1
LQ Newbie
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
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

Old 11-15-2009, 10:15 AM   #2
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
Originally Posted by anoopmenons View Post
But some junk value is coming in the shared memory created.
What do you mean by this? Shared memory will probably contain garbage when you create it - that's nothing to worry about.

John G


memory, shared

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating more than one shared memory by a process anoopmenons Linux - Embedded & Single-board computer 1 11-15-2009 12:11 PM
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
Accessing shared memory opened in a windows process in a connected linux pc gonzalesmico Programming 3 06-07-2007 02:31 PM
Creating Ora10g database on FC2 gives unable to create shared memory segment.... deanbrown3d Linux - Software 1 10-23-2004 11:40 AM
Creating FIFO messaege buffer using shared memory indika7777 Programming 1 03-27-2004 05:14 AM

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration