Template Class DynamicSizePool

Nested Relationships

Class Documentation

template<class IA = StdAllocator>
class DynamicSizePool

Public Functions

DynamicSizePool(umpire::strategy::AllocationStrategy *strat, const std::size_t _minInitialBytes = (16 * 1024), const std::size_t _minBytes = 256)
~DynamicSizePool()
void *allocate(std::size_t size)
void deallocate(void *ptr)
std::size_t getCurrentSize() const
std::size_t getActualSize() const
std::size_t getHighWatermark() const
std::size_t getBlocksInPool() const
std::size_t getLargestAvailableBlock() const
std::size_t getReleasableSize() const
std::size_t getFreeBlocks() const
std::size_t getInUseBlocks() const
void coalesce()
void release()

Protected Types

typedef FixedSizePool<struct Block, IA, IA, (1 << 6)> BlockPool

Protected Functions

void findUsableBlock(struct Block *&best, struct Block *&prev, std::size_t size)
std::size_t alignmentAdjust(const std::size_t size)
void allocateBlock(struct Block *&curr, struct Block *&prev, const std::size_t size)
void splitBlock(struct Block *&curr, struct Block *&prev, const std::size_t size)
void releaseBlock(struct Block *curr, struct Block *prev)
std::size_t freeReleasedBlocks()
void coalesceFreeBlocks(std::size_t size)
void freeAllBlocks()

Protected Attributes

BlockPool blockPool
struct Block *usedBlocks
struct Block *freeBlocks
std::size_t totalBlocks
std::size_t totalBytes
std::size_t allocBytes
std::size_t minInitialBytes
std::size_t minBytes
std::size_t highWatermark
umpire::strategy::AllocationStrategy *allocator
struct Block

Public Members

template<>
char *data
template<>
std::size_t size
template<>
std::size_t blockSize
template<>
Block *next