#include <memorypool.h>
Additional Inherited Members | |
Public Member Functions inherited from Common::MemoryPool | |
MemoryPool (size_t chunkSize) | |
void * | allocChunk () |
void | freeChunk (void *ptr) |
void | freeUnusedPages () |
size_t | getChunkSize () const |
Protected Member Functions inherited from Common::MemoryPool | |
MemoryPool (const MemoryPool &) | |
MemoryPool & | operator= (const MemoryPool &) |
void | allocPage () |
void | addPageToPool (const Page &page) |
bool | isPointerInPage (void *ptr, const Page &page) |
Protected Attributes inherited from Common::MemoryPool | |
const size_t | _chunkSize |
Array< Page > | _pages |
void * | _next |
size_t | _chunksPerPage |
This is a memory pool which already contains in itself some storage space for a fixed number of chunks. Thus if the memory pool is only lightly used, no malloc() calls have to be made at all.