ace::VoidPool Class Reference

VoidPool performs as pool of void type, although internally it's implementation is based on pool of char(s). More...

#include <pool.h>

Inherits RandomSizedMemoryPool< char >.

List of all members.

Public Member Functions

 VoidPool (size_t block_size) throw ()
 Constructor initializes new pool, but does not allocate any memory.
virtual ~VoidPool (void) throw ()
 Destroys the pool, deallocate all blocks.
virtual void * get_raw_memory (size_t mem_size)
 Returns pointer to free memory of size `mem_size`.


Detailed Description

VoidPool performs as pool of void type, although internally it's implementation is based on pool of char(s).

Constructor & Destructor Documentation

ace::VoidPool::VoidPool ( size_t  block_size  )  throw () [inline]

Constructor initializes new pool, but does not allocate any memory.

Parameters:
block_size Size of the pool (in sizeof(chars)).

virtual ace::VoidPool::~VoidPool ( void   )  throw () [inline, virtual]

Destroys the pool, deallocate all blocks.


Member Function Documentation

virtual void* ace::VoidPool::get_raw_memory ( size_t  mem_size  )  [inline, virtual]

Returns pointer to free memory of size `mem_size`.

If `mem_size` is bigger than size of memory blocks within the pool, NULL is returned. Moreover if there is not enough memory and new memory cannot be allocated, function throws std::bad_alloc.

Parameters:
mem_size The size of demanded memory.
Returns:
Pointer to beginning of the returned memory or NULL if `mem_size` is invalid.
Exceptions:
std::bad_alloc When there is no more memory available.


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

Generated on Wed Aug 6 23:25:51 2008 for PACE by  doxygen 1.5.6