Public Member Functions
|GSharedMemory (char *Name, int Size)|
|Construt the shared memory. |
|void *||GetPtr ()|
|Returns the start of the block. |
|Returns the number of bytes addressable. |
|Disconnects from the shared memory resource. |
This class enables separate processes to access the same peice of memory. A full discussion of the problems of pre-emptively multi-tasked processes accessing the same memory is beyond the scope of this document but suffice to say you need to know what your doing.
Initially all the bytes of the memory block are initialized to 0.
Construt the shared memory.
|Name||The unique name of the memory block. Should be the same string used by all processes wishing to access the same memory.|
|Size||The number of bytes to allocate, should also be the same in all processes connecting to the shared memory.|
Disconnect from the shared memory and free resources. This doesn't delete the shared memory block on Linux.