Flow
Documentation for the Flow C++ Library
|
A linear arena memory resource that allocates memory sequentially from a fixed buffer. Throws std::bad_alloc if there is insufficient space for the requested allocation. More...
#include <flow_arena_memory_resource.h>
Public Member Functions | |
ArenaMemoryResource (void *buffer, std::size_t capacity) noexcept | |
Public Member Functions inherited from flow::MemoryResource | |
virtual | ~MemoryResource ()=default |
void * | allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
void | deallocate (void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
Protected Member Functions | |
virtual void * | allocateImp (std::size_t bytes, std::size_t alignment) override |
virtual void | deallocateImp (void *address, std::size_t bytes, std::size_t alignment) override |
Protected Attributes | |
void * | buffer_ |
std::size_t | capacity_ |
A linear arena memory resource that allocates memory sequentially from a fixed buffer. Throws std::bad_alloc if there is insufficient space for the requested allocation.
Definition at line 13 of file flow_arena_memory_resource.h.
|
inlineexplicitnoexcept |
Definition at line 15 of file flow_arena_memory_resource.h.
|
inlineoverrideprotectedvirtual |
Implements flow::MemoryResource.
Definition at line 29 of file flow_arena_memory_resource.h.
|
inlineoverrideprotectedvirtual |
Implements flow::MemoryResource.
Definition at line 40 of file flow_arena_memory_resource.h.
References buffer_.
|
protected |
Definition at line 26 of file flow_arena_memory_resource.h.
Referenced by allocateImp(), and deallocateImp().
|
protected |
Definition at line 27 of file flow_arena_memory_resource.h.
Referenced by allocateImp().