![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Decorator around IPool to make it memory limited. More...
#include <roc_core/limited_pool.h>

Public Member Functions | |
| LimitedPool (IPool &pool, MemoryLimiter &memory_limiter) | |
| Initialize. | |
| virtual size_t | allocation_size () const |
| Get size of the allocation per object. | |
| virtual size_t | object_size () const |
| Get size of the object. | |
| virtual bool | reserve (size_t n_objects) |
| Reserve memory for given number of objects. | |
| virtual void * | allocate () |
| Allocate memory for an object, after checking with the memory limiter. | |
| virtual void | deallocate (void *memory) |
| Return memory to pool, then update the memory limiter. | |
Public Member Functions inherited from roc::core::IPool | |
| template<class T > | |
| void | destroy_object (T &object) |
| Destroy object and deallocate its memory. | |
Decorator around IPool to make it memory limited.
Definition at line 23 of file limited_pool.h.
| roc::core::LimitedPool::LimitedPool | ( | IPool & | pool, |
| MemoryLimiter & | memory_limiter | ||
| ) |
Initialize.
Allocate memory for an object, after checking with the memory limiter.
Implements roc::core::IPool.
Get size of the allocation per object.
Implements roc::core::IPool.
Return memory to pool, then update the memory limiter.
Implements roc::core::IPool.
Get size of the object.
Implements roc::core::IPool.
Reserve memory for given number of objects.
Implements roc::core::IPool.