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

Arena implementation that just fails all allocations. Can be used with containers that have embedded capacity and arena, but we want them to use only embedded capacity. More...

#include <noop_arena.h>

Inheritance diagram for roc::core::NoopArenaImpl:
Collaboration diagram for roc::core::NoopArenaImpl:

Public Member Functions

virtual void * allocate (size_t size)
 Allocate memory no-op. More...
 
virtual void deallocate (void *ptr)
 Deallocate memory no-op. More...
 
virtual size_t compute_allocated_size (size_t size) const
 Compute allocated size no-op. More...
 
virtual size_t allocated_size (void *ptr) const
 Allocated size given pointer no-op. More...
 
- Public Member Functions inherited from roc::core::IArena
template<class T >
void destroy_object (T &object)
 Destroy object and deallocate its memory. More...
 

Detailed Description

Arena implementation that just fails all allocations. Can be used with containers that have embedded capacity and arena, but we want them to use only embedded capacity.

Definition at line 24 of file noop_arena.h.

Member Function Documentation

◆ allocate()

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

Allocate memory no-op.

Returns
Always returns null.

Implements roc::core::IArena.

◆ allocated_size()

virtual size_t roc::core::NoopArenaImpl::allocated_size ( void *  ptr) const
virtual

Allocated size given pointer no-op.

Returns
Always 0.

Implements roc::core::IArena.

◆ compute_allocated_size()

virtual size_t roc::core::NoopArenaImpl::compute_allocated_size ( size_t  size) const
virtual

Compute allocated size no-op.

Returns
Always 0.

Implements roc::core::IArena.

◆ deallocate()

virtual void roc::core::NoopArenaImpl::deallocate ( void *  ptr)
virtual

Deallocate memory no-op.

Implements roc::core::IArena.


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