#include <mempool.h>
Public Member Functions | |
MemPool () | |
Default constructor. | |
MemPool (int chunksize) | |
Constructor initializing the chunk size. | |
~MemPool () | |
Destructor. | |
void | init (int chunksize) |
Clears all previously allocated memory and sets the chunk size. | |
T * | allocate (int n) |
Allocate an array of n objects, returning a pointer to the array. |
The class is templated on the type of the object.