#include <Semaphores.h>
Collaboration diagram for PLearn::SharedMemory< T >:
Public Member Functions | |
SharedMemory (int n_items=1) | |
allocate shared memory | |
SharedMemory (SemId semid) | |
access an existing shared memory area | |
T * | data () const |
convert to address of beginning of shared memory segment | |
int | size () const |
~SharedMemory () | |
release id and memory | |
Protected Attributes | |
SemId | id |
shared memory id provided by the operating system at construction | |
bool | owner |
true if this process is the owner of the shared memory, i.e | |
int | size_ |
in number of bytes | |
T * | segment |
allocated segment |
|
allocate shared memory
Definition at line 176 of file Semaphores.h. References PLearn::SharedMemory< T >::owner, PLERROR, PLearn::SharedMemory< T >::segment, and PLearn::SharedMemory< T >::size_. |
|
access an existing shared memory area
Definition at line 189 of file Semaphores.h. References PLearn::SharedMemory< T >::id, PLearn::SharedMemory< T >::owner, PLERROR, PLearn::SharedMemory< T >::segment, and PLearn::SharedMemory< T >::size_. |
|
release id and memory
Definition at line 205 of file Semaphores.h. References PLearn::endl(), PLearn::SharedMemory< T >::owner, PLERROR, and PLearn::SharedMemory< T >::segment. |
|
convert to address of beginning of shared memory segment
Definition at line 200 of file Semaphores.h. References PLearn::SharedMemory< T >::segment. |
|
Definition at line 202 of file Semaphores.h. References PLearn::SharedMemory< T >::size_. |
|
shared memory id provided by the operating system at construction
Definition at line 169 of file Semaphores.h. Referenced by PLearn::SharedMemory< T >::SharedMemory(). |
|
true if this process is the owner of the shared memory, i.e the shared memory will be released with this object is deleted Definition at line 170 of file Semaphores.h. Referenced by PLearn::SharedMemory< T >::SharedMemory(), and PLearn::SharedMemory< T >::~SharedMemory(). |
|
allocated segment
Definition at line 173 of file Semaphores.h. Referenced by PLearn::SharedMemory< T >::data(), PLearn::SharedMemory< T >::SharedMemory(), and PLearn::SharedMemory< T >::~SharedMemory(). |
|
in number of bytes
Definition at line 172 of file Semaphores.h. Referenced by PLearn::SharedMemory< T >::SharedMemory(), and PLearn::SharedMemory< T >::size(). |