Click to See Complete Forum and Search --> : What is shared memory ?


Donovan
11-10-2000, 03:31 PM
Hi, I heard people that an application XXX would better run with shared memory.
What is shared memory system ? How can I check if I use it ? How can I enable it in case its not ?

Thanks,
Donov

rstebb
11-10-2000, 03:42 PM
If you mean a computer with shared memory, it is one in which you can allocate more or less system memory (RAM) to the video. In other words lets say you buy a computer with 64 mb of shared memory. A portion of that is allocated to the video. If 8 MB is allocated to video then 56 MB is used for sytem memory. The amount allocated can be adjusted in the BIOS.

If that is not what you meant by your question then.... Never mind. http://www.linuxnewbie.org/ubb/smile.gif

toolie
11-10-2000, 03:46 PM
Shared memory is also a way to share information between different applications. Normally, memory (ie, variables) is protected and only available to the parent program. Shared memory is memory (ie, variables) that are available to all programs that attach to that shared memory segment.

If you need more info than that, lemme know.

ille_pugil42
11-10-2000, 05:03 PM
could you expand on that? I'm not quite getting it.

klamath
11-10-2000, 05:36 PM
rstebb, that's totally different.

As toolie said, shared memory is basically when memory is 'shared' between processes. This reduces memory usage, because you only need 1 copy of the data in memory.

------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the BBB (http://bbb.sourceforge.net)

toolie
11-10-2000, 06:27 PM
klamath: Not only does it reduce memory usage, but it allows several separate processes working together. Using shared memory, you can have totally separate programs 'hook' up to a shared memory segment, so that they share the same values. Personally, I use shared memory so that a 1) simulation is run on its own, a 2) map view of the simulation can be displayed, a 3) out-the-window view of the scene from the current player is shown, a 4) cockpit view of the current player is displayed, and 5) data collection is running to uhhhhh, collect data http://www.linuxnewbie.org/ubb/biggrin.gif. That is five separate processes. That makes it easier to program in modules and only turn on, or run, what is necessary at that time. Each of the programs knows what the correct data to show or report because of the shared memory segment that they attach to is the same.

veloctTX
11-10-2000, 06:36 PM
Toolie:

How do you go about seting up the sharing of memory?

klamath
11-10-2000, 11:43 PM
It's written into the app. Do you mean how to you write programs which use shared memory?

------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the BBB (http://bbb.sourceforge.net)

veloctTX
11-11-2000, 02:41 PM
Klamath:

You answered my question. Some apps have it coded into them. Thanks.