#include <sharedMemory.h>
Public Methods | |
SharedMemory (const String &name, int size) | |
Constructor. More... | |
~SharedMemory () | |
Destructor. More... | |
void * | getAddress () |
Address of shared memory block. More... | |
int | getSize () |
Size of shared memory block. More... | |
Private Attributes | |
int | _shmid |
unix shared memory identifier. | |
void * | _address |
unix shared memory address. | |
int | _size |
shared memory size. |
This class manages IPC shared memory. Implementation of this class is platform/system dependent.
Definition at line 46 of file sharedMemory.h.
|
Constructor. It attaches shared memory associated with given name. If shared memory doesn't exist yet, new shared block of memory is created and associated with given name.
Definition at line 38 of file sharedMemory.cpp. |
|
Destructor. It deattaches attached shared memory from the address space of the process. If possible, block of shared memory is destroyed. Definition at line 53 of file sharedMemory.cpp. |
|
Address of shared memory block. This method returns a pointer where shared memory begins - is mapped to process' address space.
Definition at line 89 of file sharedMemory.h. Referenced by CommunShMem::initialize(), CommunShMem::operator<<(), CommunShMem::operator>>(), and CommunShMem::~CommunShMem().
|
|
Size of shared memory block.
Definition at line 95 of file sharedMemory.h. Referenced by CommunShMem::operator<<(), and CommunShMem::operator>>().
|