ACE Tutorial 019
Sharing your Memories


Did you ever wish you could read someone's mind? Or that they could read yours?

Well, we won't be doing that here but we'll try to get close by letting your code do something similar: Shared Memory.

What we're going to do is ask the operating system to set aside a part of RAM that we can share with another process. By doing this, we can allow our applications to swap data very efficiently.

Along the way, we'll have to come up with some sort of coordination betweent the processes. That is the most difficult part of a shared memory system. In the tutorial we're just going to take a simplistic approach (eg -- busy loop) but real-world applications will need to take a serious look at process-level synch mechanisms such as ACE_*_Semaphore.

Caveat: I've barely begun to use shared memory myself. This tutorial and the next are very simple-minded and primitive. Anyone who wants to provide more realistic replacements is encouraged to drop me a note (jcej@lads.com).

A tutorial wouldn't be complete without Kirthika's abstract:


[Tutorial Index] [Continue This Tutorial]