Pyrogenesis  trunk
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
Allocators::Pool< T, Storage > Class Template Reference

allocator design parameters: More...

#include <pool.h>

Collaboration diagram for Allocators::Pool< T, Storage >:
Collaboration graph
[legend]

Public Member Functions

 Pool (size_t maxObjects)
 
size_t RemainingObjects ()
 
TAllocate ()
 
void Deallocate (T *p)
 
void DeallocateAll ()
 
bool Contains (uintptr_t address) const
 

Static Public Attributes

static const size_t objectSize = ROUND_UP(sizeof(T), sizeof(intptr_t))
 

Private Member Functions

 NONCOPYABLE (Pool)
 

Private Attributes

Storage storage
 
size_t end
 
void * freelist
 

Detailed Description

template<typename T, class Storage = Storage_Fixed<>>
class Allocators::Pool< T, Storage >

allocator design parameters:

Constructor & Destructor Documentation

template<typename T, class Storage = Storage_Fixed<>>
Allocators::Pool< T, Storage >::Pool ( size_t  maxObjects)
inline

Member Function Documentation

template<typename T, class Storage = Storage_Fixed<>>
T* Allocators::Pool< T, Storage >::Allocate ( )
inline
template<typename T, class Storage = Storage_Fixed<>>
bool Allocators::Pool< T, Storage >::Contains ( uintptr_t  address) const
inline
template<typename T, class Storage = Storage_Fixed<>>
void Allocators::Pool< T, Storage >::Deallocate ( T p)
inline
template<typename T, class Storage = Storage_Fixed<>>
void Allocators::Pool< T, Storage >::DeallocateAll ( )
inline
template<typename T, class Storage = Storage_Fixed<>>
Allocators::Pool< T, Storage >::NONCOPYABLE ( Pool< T, Storage )
private
template<typename T, class Storage = Storage_Fixed<>>
size_t Allocators::Pool< T, Storage >::RemainingObjects ( )
inline

Member Data Documentation

template<typename T, class Storage = Storage_Fixed<>>
size_t Allocators::Pool< T, Storage >::end
private
template<typename T, class Storage = Storage_Fixed<>>
void* Allocators::Pool< T, Storage >::freelist
private
template<typename T, class Storage = Storage_Fixed<>>
const size_t Allocators::Pool< T, Storage >::objectSize = ROUND_UP(sizeof(T), sizeof(intptr_t))
static
template<typename T, class Storage = Storage_Fixed<>>
Storage Allocators::Pool< T, Storage >::storage
private

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