Sierra Toolkit Version of the Day
eastl::fixed_pool Class Reference

#include <fixed_pool_eastl.h>

Inheritance diagram for eastl::fixed_pool:
Collaboration diagram for eastl::fixed_pool:

List of all members.

Public Member Functions

 fixed_pool (void *pMemory=NULL)
 fixed_pool (void *pMemory, size_t memorySize, size_t nodeSize, size_t alignment, size_t alignmentOffset=0)
fixed_pooloperator= (const fixed_pool &)
void * allocate ()
void deallocate (void *p)
const char * get_name () const
void set_name (const char *)

Detailed Description

fixed_pool

Implements a simple fixed pool allocator for use by fixed-size containers. This is not a generic eastl allocator which can be plugged into an arbitrary eastl container, as it simplifies some functions are arguments for the purpose of efficiency.

Definition at line 260 of file fixed_pool_eastl.h.


Constructor & Destructor Documentation

eastl::fixed_pool::fixed_pool ( void *  pMemory = NULL) [inline]

fixed_pool

Default constructor. User usually will want to call init() after constructing via this constructor. The pMemory argument is for the purposes of temporarily storing a pointer to the buffer to be used. Even though init may have a pMemory argument, this arg is useful for temporary storage, as per copy construction.

Definition at line 271 of file fixed_pool_eastl.h.

eastl::fixed_pool::fixed_pool ( void *  pMemory,
size_t  memorySize,
size_t  nodeSize,
size_t  alignment,
size_t  alignmentOffset = 0 
) [inline]

fixed_pool

Constructs a fixed_pool with a given set of parameters.

Definition at line 281 of file fixed_pool_eastl.h.


Member Function Documentation

fixed_pool& eastl::fixed_pool::operator= ( const fixed_pool ) [inline]

operator=

Definition at line 290 of file fixed_pool_eastl.h.

void* eastl::fixed_pool::allocate ( ) [inline]

allocate

Allocates a new object of the size specified upon class initialization. Returns NULL if there is no more memory.

Definition at line 302 of file fixed_pool_eastl.h.

void eastl::fixed_pool::deallocate ( void *  p) [inline]

deallocate

Frees the given object which was allocated by allocate(). If the given node was not allocated by allocate() then the behaviour is undefined.

Definition at line 347 of file fixed_pool_eastl.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines