#include <pool.h>

List of all members.

Detailed Description

OE_FIXED_ALLOCATOR This is fixed allocator which can allocate instances.

The slot, at any given time, can be either free or occupied. If occupied - holds single instance of user object of type _T. If free - holds pointer to next free slot.

There is no direct indication or flag telling whether particular slot is free or occupied without traversing free slots list. However, this is not needed for both alloc() and free() operations, which is the trick that makes the simple allocator so fast.

Definition at line 21 of file pool.h.

Public Member Functions

 OE_FIXED_ALLOCATOR (int block_size)
 Construct empty memory pool.
 Free all pool memory and destroy the pool.
void * alloc ()
 Allocate another chunk of data.

Constructor & Destructor Documentation

OE_FIXED_ALLOCATOR::OE_FIXED_ALLOCATOR ( int  block_size  )  [inline]

Construct empty memory pool.

Definition at line 35 of file pool.h.


Free all pool memory and destroy the pool.

Definition at line 41 of file pool.h.

Member Function Documentation

void* OE_FIXED_ALLOCATOR::alloc (  )  [inline]

Allocate another chunk of data.

Definition at line 51 of file pool.h.

The documentation for this class was generated from the following file:
Generated on Sat Sep 9 03:50:50 2006 for Openem APIs by  doxygen 1.4.7