LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-08-2006, 11:40 AM   #1
clunix
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Rep: Reputation: 0
using shared memory


I would like now can I use the concept of shared memory to communicat between perant and child
ex.
I want a program that allow to the child1 does z=1+1 and child2 does x=2*2 and then the result show by the perant not by any childern




If any body can help me because I want to learn how can I use sherd memory in this case.

best regards,,,,,
 
Old 04-08-2006, 12:13 PM   #2
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
Google: linux shared memory
You get 20 million results.
 
Old 04-08-2006, 12:13 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Simple - the calls you want are "shmget()" (get shared memory segment), followed by "shmat()" (attach to shared memory segment).

Here's a great tutorial:
http://users.actcom.co.il/~choo/lupg...i-process.html

Here's another (somewhat simpler) tutorial:
http://kt.squeakydolphin.com/sysv_shared_mem.jsp

'Hope that helps .. PSM

Last edited by paulsm4; 04-08-2006 at 12:14 PM.
 
  


Reply



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
is shared memory expandable in memory size? Thinking Programming 4 08-16-2005 09:57 AM
c + shared memory dilberim82 Programming 3 03-07-2005 07:49 PM
shared memory blackzone Programming 1 10-14-2004 11:52 AM
About Shared Memory...? aegis_shiva Programming 1 08-25-2004 05:05 AM
shared memory socket9001 Programming 4 02-06-2004 02:08 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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
Open Source Consulting | Domain Registration