Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Memory arena interface. More...
#include <iarena.h>
Public Member Functions | |
virtual void * | allocate (size_t size)=0 |
Allocate memory. More... | |
virtual void | deallocate (void *ptr)=0 |
Deallocate previously allocated memory. More... | |
virtual size_t | compute_allocated_size (size_t size) const =0 |
Computes how many bytes will be actually allocated if allocate() is called with given size. Covers all internal overhead, if any. More... | |
virtual size_t | allocated_size (void *ptr) const =0 |
Returns how many bytes was allocated for given pointer returned by allocate(). Covers all internal overhead, if any. Returns same value as computed by compute_allocated_size(size). More... | |
template<class T > | |
void | destroy_object (T &object) |
Destroy object and deallocate its memory. More... | |
|
pure virtual |
Allocate memory.
size
bytes or NULL if memory can't be allocated. Implemented in roc::core::NoopArenaImpl, roc::core::LimitedArena, and roc::core::HeapArena.
|
pure virtual |
Returns how many bytes was allocated for given pointer returned by allocate(). Covers all internal overhead, if any. Returns same value as computed by compute_allocated_size(size).
Implemented in roc::core::NoopArenaImpl, roc::core::LimitedArena, and roc::core::HeapArena.
|
pure virtual |
Computes how many bytes will be actually allocated if allocate() is called with given size. Covers all internal overhead, if any.
Implemented in roc::core::NoopArenaImpl, roc::core::LimitedArena, and roc::core::HeapArena.
|
pure virtual |
Deallocate previously allocated memory.
Implemented in roc::core::NoopArenaImpl, roc::core::LimitedArena, and roc::core::HeapArena.
|
inline |