Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 06-14-2005, 02:17 PM   #1
LQ Newbie
Registered: Jun 2005
Posts: 5

Rep: Reputation: 0
Shared Memory/ Semaphores

Does anyone have a good source of information on this topic.
To be specific, i was researching the issue of shared memory for IPC memory management and have found a lot of the same genric answers.

My question was whether the shared memory which is allocated by shmget() resides on process heap/stack and can it be used to share the stack space?

I have been looking at some material which summarizes the shared memory as linked to process address space. Thanks for any advice.
Old 06-14-2005, 03:41 PM   #2
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 110Reputation: 110
FWIW, by intuition I'd say shared memory on the stack will not be possible.
Old 06-14-2005, 10:14 PM   #3
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
the answer to you first part of the question is : it is neither from the stack or heap..but from an area between the two...this area is basically mapped as shared memory by your kernel..i doubt if you can use it to share the stack space ??? ((not sure what that means..)cos in that case you are trying to share the stack space among two processes...not possible, if i got you rite)
Old 06-20-2005, 01:13 PM   #4
LQ Newbie
Registered: Jun 2005
Posts: 5

Original Poster
Rep: Reputation: 0

This topic was quite a doozie to finalize an answer. My prof had a half hour discussion about it with the class. I hope I still remember what he said.


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
is shared memory expandable in memory size? Thinking Programming 4 08-16-2005 09:57 AM
Posix file based process shared semaphores dragonman Programming 9 05-25-2005 04:44 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 and semaphores... socket9001 Programming 3 02-16-2004 11:18 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:13 AM.

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