Code::Blocks  SVN r11506
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BlockAllocator< T, pool_size, debug > Class Template Reference

#include <blockallocated.h>

Collaboration diagram for BlockAllocator< T, pool_size, debug >:

Classes

union  LinkedBlock
 

Public Member Functions

 BlockAllocator ()
 
 ~BlockAllocator ()
 
void * New ()
 
void Delete (void *ptr)
 

Private Member Functions

void AllocBlockPushBack ()
 
void PushFront (LinkedBlock< T > *p)
 

Private Attributes

std::vector< LinkedBlock< T > * > allocBlocks
 
LinkedBlock< T > * first
 
int ref_count
 
int max_refs
 
int total_refs
 

Detailed Description

template<class T, unsigned int pool_size, const bool debug>
class BlockAllocator< T, pool_size, debug >

Definition at line 28 of file blockallocated.h.


Class Documentation

◆ BlockAllocator::LinkedBlock

union BlockAllocator::LinkedBlock

template<class T, unsigned int pool_size, const bool debug>
template<class U>
union BlockAllocator< T, pool_size, debug >::LinkedBlock< U >

Definition at line 31 of file blockallocated.h.

Collaboration diagram for BlockAllocator< T, pool_size, debug >::LinkedBlock< U >:
Class Members
char data[sizeof(U)]
LinkedBlock< U > * next

Constructor & Destructor Documentation

◆ BlockAllocator()

template<class T, unsigned int pool_size, const bool debug>
BlockAllocator< T, pool_size, debug >::BlockAllocator ( )
inline

Definition at line 67 of file blockallocated.h.

◆ ~BlockAllocator()

template<class T, unsigned int pool_size, const bool debug>
BlockAllocator< T, pool_size, debug >::~BlockAllocator ( )
inline

Member Function Documentation

◆ AllocBlockPushBack()

template<class T, unsigned int pool_size, const bool debug>
void BlockAllocator< T, pool_size, debug >::AllocBlockPushBack ( )
inlineprivate

◆ Delete()

template<class T, unsigned int pool_size, const bool debug>
void BlockAllocator< T, pool_size, debug >::Delete ( void *  ptr)
inline

◆ New()

template<class T, unsigned int pool_size, const bool debug>
void* BlockAllocator< T, pool_size, debug >::New ( )
inline

◆ PushFront()

template<class T, unsigned int pool_size, const bool debug>
void BlockAllocator< T, pool_size, debug >::PushFront ( LinkedBlock< T > *  p)
inlineprivate

Member Data Documentation

◆ allocBlocks

template<class T, unsigned int pool_size, const bool debug>
std::vector<LinkedBlock<T>*> BlockAllocator< T, pool_size, debug >::allocBlocks
private

Definition at line 37 of file blockallocated.h.

◆ first

template<class T, unsigned int pool_size, const bool debug>
LinkedBlock<T>* BlockAllocator< T, pool_size, debug >::first
private

Definition at line 39 of file blockallocated.h.

◆ max_refs

template<class T, unsigned int pool_size, const bool debug>
int BlockAllocator< T, pool_size, debug >::max_refs
private

Definition at line 41 of file blockallocated.h.

◆ ref_count

template<class T, unsigned int pool_size, const bool debug>
int BlockAllocator< T, pool_size, debug >::ref_count
private

Definition at line 40 of file blockallocated.h.

◆ total_refs

template<class T, unsigned int pool_size, const bool debug>
int BlockAllocator< T, pool_size, debug >::total_refs
private

Definition at line 42 of file blockallocated.h.


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