GSharedMemory Class Reference

Shared memory wrapper class. More...

#include <GSharedMemory.h>

List of all members.

Public Member Functions

 GSharedMemory (char *Name, int Size)
 Construt the shared memory.
virtual ~GSharedMemory ()
void * GetPtr ()
 Returns the start of the block.
int GetSize ()
 Returns the number of bytes addressable.
void Destroy ()
 Disconnects from the shared memory resource.

Detailed Description

Shared memory wrapper class.

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.

Constructor & Destructor Documentation

GSharedMemory::GSharedMemory ( char *  Name,
int  Size 

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.

GSharedMemory::~GSharedMemory (  )  [virtual]

Disconnect from the shared memory and free resources. This doesn't delete the shared memory block on Linux.

The documentation for this class was generated from the following files:

Generated on Wed Dec 1 15:41:04 2010 for Lgi by  doxygen