"Fossies" - the Fresh Open Source Software Archive
Member "muscle/html/muscle-by-example/docs/sharedmemory.md" (8 Jun 2019, 1820 Bytes) of package /linux/privat/muscle7.30.zip:
As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format).
Alternatively you can here view
the uninterpreted source code file.
A member file download can also be achieved by clicking within a package contents listing on the according byte size field.
muscle::SharedMemory class (API)
An OS-neutral API for creating and accessing a shared-memory region.
- Used to share memory across multiple processes
- The shared memory region is accessed by an agreed-upon globally-unique name, which is passed in to the SetArea() method by each participating process.
- A SharedMemory object also includes a cross-process reader/writer lock to help synchronize access to the shared data.
- Multiple processes may lock the shared memory area for reading simultaneously (via LockAreaReadOnly())
- Only one process may lock the shared memory area for writing at a time (via LockAreaReadWrite())
- LockAreaReadWrite() won’t return until all other locks (both readers’ and writers’) have been released.
Try compiling and running the mini-example-programs in
make to compile example_*, and then run each from Terminal while looking at the corresponding .cpp file)
Quick links to source code of relevant MUSCLE-by-example programs: