Public Member Functions

FbxMemoryPool Class Reference

Search for all occurrences

Detailed Description

Class to create a simple fixed-size-blocks memory pool to allocate memory dynamically.

Definition at line 43 of file fbxmemory.h.

#include <fbxmemory.h>

List of all members.

Public Member Functions

  FbxMemoryPool (size_t pBlockSize=0, size_t pBlockCount=0, bool pAlignment=false, bool pResizable=true, bool pSupportConcurrentAccess=true)
  The class constructor.
virtual  ~FbxMemoryPool ()
void  Init (size_t pBlockSize, size_t pBlockCount=0, bool pAlignment=false, bool pResizable=true)
  Initiate the memory pool to the given parameters.
void  Clear ()
  Uninitialized memory pool.
void *  Allocate ()
  Allocate or lock for usage a memory block.
void  Free (void *pMemBlock)
  Dispose or unlock the usage of a memory block.

Constructor & Destructor Documentation

FbxMemoryPool ( size_t  pBlockSize = 0,
size_t  pBlockCount = 0,
bool  pAlignment = false,
bool  pResizable = true,
bool  pSupportConcurrentAccess = true 
)

The class constructor.

Parameters:
pBlockSize
pBlockCount
pAlignment
pResizable
pSupportConcurrentAccess Whether the pool supports concurrent allocation and release operations.
virtual ~FbxMemoryPool ( ) [virtual]

Member Function Documentation

void Init ( size_t  pBlockSize,
size_t  pBlockCount = 0,
bool  pAlignment = false,
bool  pResizable = true 
)

Initiate the memory pool to the given parameters.

Parameters:
pBlockSize
pBlockCount The blocks size.
pAlignment Alignment.
pResizable Is it resizable?
void Clear ( )

Uninitialized memory pool.

void* Allocate ( )

Allocate or lock for usage a memory block.

Returns:
a memory block.
void Free ( void *  pMemBlock )

Dispose or unlock the usage of a memory block.

Asserting that this pool own this block.

Parameters:
pMemBlock

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

FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool
FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool FbxMemoryPool