Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::HeapAllocator Class Reference

Heap allocator implementation. More...

#include <heap_allocator.h>

Inheritance diagram for roc::core::HeapAllocator:
Collaboration diagram for roc::core::HeapAllocator:

Public Member Functions

virtual void * allocate (size_t size)
 Allocate memory. More...
 
virtual void deallocate (void *)
 Deallocate previously allocated memory. More...
 
size_t num_allocations () const
 Get number of allocated blocks. More...
 
- Public Member Functions inherited from roc::core::IAllocator
template<class T >
void destroy (T &object)
 Destroy object and deallocate its memory. More...
 

Detailed Description

Heap allocator implementation.

Uses global operator new[] and operator delete[].

The memory is always maximum aligned. Thread-safe.

Definition at line 27 of file heap_allocator.h.

Member Function Documentation

virtual void* roc::core::HeapAllocator::allocate ( size_t  size)
virtual

Allocate memory.

Implements roc::core::IAllocator.

virtual void roc::core::HeapAllocator::deallocate ( void *  )
virtual

Deallocate previously allocated memory.

Implements roc::core::IAllocator.

size_t roc::core::HeapAllocator::num_allocations ( ) const

Get number of allocated blocks.


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