UMPIRE
Umpire: resource management and provision
FixedSizePool< T, MA, IA, NP > Class Template Reference

#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/strategy/FixedSizePool.hpp>

Classes

struct  Pool
 

Public Member Functions

 FixedSizePool ()
 
 ~FixedSizePool ()
 
T * allocate ()
 
void deallocate (T *ptr)
 
std::size_t getCurrentSize () const
 Return allocated size to user. More...
 
std::size_t getActualSize () const
 Return total size with internal overhead. More...
 
std::size_t numPools () const
 Return the number of pools. More...
 
std::size_t poolSize () const
 Return the pool size. More...
 

Static Public Member Functions

static FixedSizePoolgetInstance ()
 

Protected Member Functions

void newPool (struct Pool **pnew)
 
T * allocInPool (struct Pool *p)
 

Protected Attributes

struct Poolpool
 
const std::size_t numPerPool
 
const std::size_t totalPoolSize
 
std::size_t numBlocks
 

Constructor & Destructor Documentation

◆ FixedSizePool()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
FixedSizePool< T, MA, IA, NP >::FixedSizePool ( )
inline

◆ ~FixedSizePool()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
FixedSizePool< T, MA, IA, NP >::~FixedSizePool ( )
inline

Member Function Documentation

◆ newPool()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
void FixedSizePool< T, MA, IA, NP >::newPool ( struct Pool **  pnew)
inlineprotected

◆ allocInPool()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
T* FixedSizePool< T, MA, IA, NP >::allocInPool ( struct Pool p)
inlineprotected

◆ getInstance()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
static FixedSizePool& FixedSizePool< T, MA, IA, NP >::getInstance ( )
inlinestatic

◆ allocate()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
T* FixedSizePool< T, MA, IA, NP >::allocate ( )
inline

◆ deallocate()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
void FixedSizePool< T, MA, IA, NP >::deallocate ( T *  ptr)
inline

◆ getCurrentSize()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
std::size_t FixedSizePool< T, MA, IA, NP >::getCurrentSize ( ) const
inline

Return allocated size to user.

◆ getActualSize()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
std::size_t FixedSizePool< T, MA, IA, NP >::getActualSize ( ) const
inline

Return total size with internal overhead.

◆ numPools()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
std::size_t FixedSizePool< T, MA, IA, NP >::numPools ( ) const
inline

Return the number of pools.

References FixedSizePool< T, MA, IA, NP >::Pool::next.

◆ poolSize()

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
std::size_t FixedSizePool< T, MA, IA, NP >::poolSize ( ) const
inline

Return the pool size.

Member Data Documentation

◆ pool

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
struct Pool* FixedSizePool< T, MA, IA, NP >::pool
protected

◆ numPerPool

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
const std::size_t FixedSizePool< T, MA, IA, NP >::numPerPool
protected

◆ totalPoolSize

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
const std::size_t FixedSizePool< T, MA, IA, NP >::totalPoolSize
protected

◆ numBlocks

template<class T , class MA , class IA = StdAllocator, int NP = (1 << 6)>
std::size_t FixedSizePool< T, MA, IA, NP >::numBlocks
protected