LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 11-15-2009, 10:23 AM   #1
anoopmenons
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

Regards.
anoopmenon
 
Old 11-15-2009, 11:15 AM   #2
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 138Reputation: 138
Quote:
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
 
  


Reply

Tags
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 01:11 PM
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 05:05 AM
Accessing shared memory opened in a windows process in a connected linux pc gonzalesmico Programming 3 06-07-2007 03:31 PM
Creating Ora10g database on FC2 gives unable to create shared memory segment.... deanbrown3d Linux - Software 1 10-23-2004 12:40 PM
Creating FIFO messaege buffer using shared memory indika7777 Programming 1 03-27-2004 06:14 AM


All times are GMT -5. The time now is 11:05 AM.

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