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>
|
virtual void * | allocate (size_t size) |
| Allocate memory no-op.
|
|
virtual void | deallocate (void *ptr) |
| Deallocate memory no-op.
|
|
virtual size_t | compute_allocated_size (size_t size) const |
| Compute allocated size no-op.
|
|
virtual size_t | allocated_size (void *ptr) const |
| Allocated size given pointer no-op.
|
|
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.
|
|
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.
◆ allocate()
virtual void * roc::core::NoopArenaImpl::allocate |
( |
size_t |
size | ) |
|
|
virtual |
◆ allocated_size()
virtual size_t roc::core::NoopArenaImpl::allocated_size |
( |
void * |
ptr | ) |
const |
|
virtual |
◆ compute_allocated_size()
virtual size_t roc::core::NoopArenaImpl::compute_allocated_size |
( |
size_t |
size | ) |
const |
|
virtual |
◆ deallocate()
virtual void roc::core::NoopArenaImpl::deallocate |
( |
void * |
ptr | ) |
|
|
virtual |
The documentation for this class was generated from the following file: