smol::IPCObject Class Reference

List of all members.

Public Member Functions

 IPCObject (void)
int getShmID (void)
void * operator new (size_t size) throw (std::bad_alloc)
void * operator new (size_t size, int shmid) throw (std::bad_alloc)
void operator delete (void *obj)

Protected Attributes

int ipco_shmid
uint32_t ipco_magic


Detailed Description

Instances of this class are always alloc at the beginning of a page and are guarantied to own all pages that are touched by the object.

Constructor & Destructor Documentation

smol::IPCObject::IPCObject ( void   ) 

Constructor.


Member Function Documentation

int smol::IPCObject::getShmID ( void   ) 

Return the shared memory segment id where this object is stored.

Returns:
The shared memory id.

void smol::IPCObject::operator delete ( void *  obj  ) 

Free the memory of the object again.

Parameters:
obj Pointer to the memory to free.

void* smol::IPCObject::operator new ( size_t  size,
int  shmid 
) throw (std::bad_alloc)

This operator allocate a new shared memory segement that will be used as storage for this object. This operator will also setup the ipco_shmid and ipco_magic members.

Parameters:
size The size of the memory to allocate.
shmid The shared memory id of the object.
Returns:
Pointer to the allocated memory.

void* smol::IPCObject::operator new ( size_t  size  )  throw (std::bad_alloc)

This operator allocate a new shared memory segement that will be used as storage for this object. This operator will also setup the ipco_shmid and ipco_magic members.

Parameters:
size The size of the memory to allocate.
Returns:
Pointer to the allocated memory.


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

Generated on Sat Aug 1 18:44:15 2009 for SMOL by  doxygen 1.5.8