Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::IArena Class Referenceabstract

Memory arena interface. More...

#include <iarena.h>

Inheritance diagram for roc::core::IArena:

Public Member Functions

virtual void * allocate (size_t size)=0
 Allocate memory. More...
 
virtual void deallocate (void *)=0
 Deallocate previously allocated memory. More...
 
template<class T >
void destroy_object (T &object)
 Destroy object and deallocate its memory. More...
 

Detailed Description

Memory arena interface.

Definition at line 23 of file iarena.h.

Member Function Documentation

◆ allocate()

virtual void* roc::core::IArena::allocate ( size_t  size)
pure virtual

Allocate memory.

Returns
pointer to a maximum aligned uninitialized memory at least of size bytes or NULL if memory can't be allocated.

Implemented in roc::core::HeapArena.

◆ deallocate()

virtual void roc::core::IArena::deallocate ( void *  )
pure virtual

Deallocate previously allocated memory.

Implemented in roc::core::HeapArena.

◆ destroy_object()

template<class T >
void roc::core::IArena::destroy_object ( T &  object)
inline

Destroy object and deallocate its memory.

Definition at line 37 of file iarena.h.


The documentation for this class was generated from the following file: