![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Memory arena interface. More...
#include <roc_core/iarena.h>

Public Member Functions | |
| virtual void * | allocate (size_t size)=0 |
| Allocate memory. | |
| virtual void | deallocate (void *ptr)=0 |
| Deallocate previously allocated memory. | |
| 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. | |
| 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). | |
| template<class T > | |
| void | destroy_object (T &object) |
| Destroy object and deallocate its memory. | |
Allocate memory.
size bytes or NULL if memory can't be allocated. Implemented in roc::core::HeapArena, roc::core::LimitedArena, and roc::core::NoopArenaImpl.
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::HeapArena, roc::core::LimitedArena, and roc::core::NoopArenaImpl.
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::HeapArena, roc::core::LimitedArena, and roc::core::NoopArenaImpl.
Deallocate previously allocated memory.
Implemented in roc::core::HeapArena, roc::core::LimitedArena, and roc::core::NoopArenaImpl.