# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLMISC::CPoolMemory Class Template Reference

Pool memory allocation. More...

#include <pool_memory.h>

List of all members.

Public Methods

 CPoolMemory (uint blockSize=10)
T * allocate ()
void free ()
void purge ()

Private Attributes

uint _BlockSize
std::list< std::vector< T > > _BlockList
std::list< std::vector< T
> >::iterator 
_BlockPointer


Detailed Description

template<class T>
class NLMISC::CPoolMemory< T >

Pool memory allocation.

This memory manager allocates bloc of elements and free all the elements at the same time. Useful for temporary allocation.

Author:
Cyril 'Hulud' Corvazier , Nevrax France
Date:
2001

Definition at line 49 of file pool_memory.h.


Constructor & Destructor Documentation

template<class T>
NLMISC::CPoolMemory< T >::CPoolMemory uint    blockSize = 10 [inline]
 

Definition at line 57 of file pool_memory.h.


Member Function Documentation

template<class T>
T* NLMISC::CPoolMemory< T >::allocate   [inline]
 

Definition at line 68 of file pool_memory.h.

template<class T>
void NLMISC::CPoolMemory< T >::free   [inline]
 

Definition at line 101 of file pool_memory.h.

template<class T>
void NLMISC::CPoolMemory< T >::purge   [inline]
 

Definition at line 121 of file pool_memory.h.


Member Data Documentation

template<class T>
std::list< std::vector<T> > NLMISC::CPoolMemory::_BlockList [private]
 

Definition at line 129 of file pool_memory.h.

Referenced by NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::allocate, NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::CPoolMemory, NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::free, and NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::purge.

template<class T>
std::list< std::vector<T> >::iterator NLMISC::CPoolMemory::_BlockPointer [private]
 

Definition at line 130 of file pool_memory.h.

Referenced by NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::allocate, NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::CPoolMemory, NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::free, and NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::purge.

template<class T>
uint NLMISC::CPoolMemory::_BlockSize [private]
 

Definition at line 128 of file pool_memory.h.

Referenced by NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::allocate, and NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::CPoolMemory.


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