Lightweight allocator/deallocator backed by an Arena.
More...
#include <AMReX_DataAllocator.H>
|
| | DataAllocator () noexcept=default |
| | Default-construct; alloc/free will use The_Arena().
|
| |
| | DataAllocator (Arena *ar) noexcept |
| | Construct with an explicit arena ar.
|
| |
| void * | alloc (std::size_t sz) const noexcept |
| | Allocate sz bytes from the arena.
|
| |
| void | free (void *pt) const noexcept |
| | Return the allocation at pt to the arena.
|
| |
| Arena * | arena () const noexcept |
| | Return the stored arena, or The_Arena() if none was set.
|
| |
|
| Arena * | m_arena = nullptr |
| | Stored arena pointer (may be null).
|
| |
Lightweight allocator/deallocator backed by an Arena.
Falls back to The_Arena() when no arena is supplied.
◆ DataAllocator() [1/2]
| amrex::DataAllocator::DataAllocator |
( |
| ) |
|
|
defaultnoexcept |
◆ DataAllocator() [2/2]
| amrex::DataAllocator::DataAllocator |
( |
Arena * |
ar | ) |
|
|
inlinenoexcept |
Construct with an explicit arena ar.
◆ alloc()
| void * amrex::DataAllocator::alloc |
( |
std::size_t |
sz | ) |
const |
|
inlinenoexcept |
Allocate sz bytes from the arena.
◆ arena()
| Arena * amrex::DataAllocator::arena |
( |
| ) |
const |
|
inlinenoexcept |
Return the stored arena, or The_Arena() if none was set.
◆ free()
| void amrex::DataAllocator::free |
( |
void * |
pt | ) |
const |
|
inlinenoexcept |
Return the allocation at pt to the arena.
◆ m_arena
| Arena* amrex::DataAllocator::m_arena = nullptr |
Stored arena pointer (may be null).
The documentation for this struct was generated from the following file: