![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
#include <pool.h>
Public Member Functions | |
Pool (IAllocator &allocator, size_t object_size, bool poison) | |
Initialization. More... | |
void * | allocate () |
Allocate new object. More... | |
void | deallocate (void *memory) |
Free previously allocated memory. More... | |
void | destroy (T &object) |
Destroy object and deallocate its memory. More... | |
Pool.
T | defines object type. |
Allocates chunks from given allocator containing a fixed number of fixed sized objects. Maintains a list of free objects.
The memory is always maximum aligned. Thread-safe.
|
inline |
|
inline |
|
inline |
|
inline |