#include <arena_resource.hh>
|
| ArenaResource (void *buffer, size_t buffer_size, size_t simd_alignment) |
| Inner constructor, used only in construction of child arena. More...
|
|
void * | raw_allocate (size_t bytes, size_t alignment) |
|
void * | do_allocate (size_t bytes, size_t alignment) override |
| Override do_allocate to handle allocation logic. More...
|
|
void | do_deallocate (FMT_UNUSED void *p, FMT_UNUSED size_t bytes, FMT_UNUSED size_t alignment) override |
| Override do_deallocate (no-op for monotonic buffer) More...
|
|
bool | do_is_equal (const std::pmr::memory_resource &other) const noexcept override |
| Override do_is_equal for memory resource comparison. More...
|
|
|
static std::pmr::memory_resource * | upstream_resource () |
| Returns different upstream resource in debug / release mode. More...
|
|
template<class Resource>
class ArenaResource< Resource >
Definition at line 31 of file arena_resource.hh.
◆ ArenaResource() [1/2]
template<class Resource >
Inner constructor, used only in construction of child arena.
Definition at line 34 of file arena_resource.hh.
◆ ArenaResource() [2/2]
template<class Resource >
◆ ~ArenaResource()
template<class Resource >
◆ allocate_8()
template<class Resource >
template<class T >
Allocate and return data pointer of n_item array of type T (alignment to length 8 bytes)
Definition at line 93 of file arena_resource.hh.
◆ allocate_simd()
template<class Resource >
template<class T >
Allocate and return data pointer of n_item array of type T (alignment to length given by simd_alignment constructor argument)
Definition at line 100 of file arena_resource.hh.
◆ do_allocate()
template<class Resource >
void* ArenaResource< Resource >::do_allocate |
( |
size_t |
bytes, |
|
|
size_t |
alignment |
|
) |
| |
|
inlineoverrideprotected |
◆ do_deallocate()
template<class Resource >
Override do_deallocate (no-op for monotonic buffer)
Definition at line 134 of file arena_resource.hh.
◆ do_is_equal()
template<class Resource >
bool ArenaResource< Resource >::do_is_equal |
( |
const std::pmr::memory_resource & |
other | ) |
const |
|
inlineoverrideprotectednoexcept |
Override do_is_equal for memory resource comparison.
Definition at line 139 of file arena_resource.hh.
◆ get_child_arena()
template<class Resource >
Create and return child arena.
Child arena is created in free space of actual arena. Actual arena is marked as full (flag full_data_) and cannot allocate new data.
Definition at line 77 of file arena_resource.hh.
◆ raw_allocate()
template<class Resource >
void* ArenaResource< Resource >::raw_allocate |
( |
size_t |
bytes, |
|
|
size_t |
alignment |
|
) |
| |
|
inlineprotected |
◆ reset()
template<class Resource >
◆ resource()
template<class Resource >
◆ upstream_resource()
template<class Resource >
static std::pmr::memory_resource* ArenaResource< Resource >::upstream_resource |
( |
| ) |
|
|
inlinestaticprotected |
Returns different upstream resource in debug / release mode.
Definition at line 47 of file arena_resource.hh.
◆ buffer_
template<class Resource >
◆ buffer_size_
template<class Resource >
◆ full_data_
template<class Resource >
◆ resource_
template<class Resource >
◆ simd_alignment_
template<class Resource >
◆ upstream_
template<class Resource >
◆ used_size_
template<class Resource >
The documentation for this class was generated from the following file: