Template Class FixedSizePool

Nested Relationships

Class Documentation

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

Public Functions

FixedSizePool()
~FixedSizePool()
T *allocate()
void deallocate(T *ptr)
std::size_t getCurrentSize() const

Return allocated size to user.

std::size_t getActualSize() const

Return total size with internal overhead.

std::size_t numPools() const

Return the number of pools.

std::size_t poolSize() const

Return the pool size.

Public Static Functions

FixedSizePool &getInstance()

Protected Functions

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

Protected Attributes

struct Pool *pool
const std::size_t numPerPool
const std::size_t totalPoolSize
std::size_t numBlocks
struct Pool

Public Members

unsigned char *data
unsigned int *avail
unsigned int numAvail
struct Pool *next