#include <tbox/ScratchArena.h>
|
| static size_t | align (const size_t bytes) |
| |
Class ScratchArena is intended for temporary memory allocation from a scratch arena. However, ScratchArena currently uses the standard C++ new and delete operators for memory allocation and deallocation.
- See also
- tbox::Arena
◆ anonymous enum
| Enumerator |
|---|
| ArenaAllocationAlignment | |
◆ ScratchArena() [1/2]
| SAMRAI::tbox::ScratchArena::ScratchArena |
( |
| ) |
|
The constructor for the scratch memory arena.
◆ ~ScratchArena()
| virtual SAMRAI::tbox::ScratchArena::~ScratchArena |
( |
| ) |
|
|
virtual |
The virtual destructor for the scratch memory arena.
◆ ScratchArena() [2/2]
| SAMRAI::tbox::ScratchArena::ScratchArena |
( |
const ScratchArena & |
| ) |
|
|
private |
◆ alloc()
| virtual void* SAMRAI::tbox::ScratchArena::alloc |
( |
const size_t |
bytes | ) |
|
|
virtual |
Allocate memory from the scratch arena. The current implementation of ScratchArena simply uses the standard C++ new operator.
Implements SAMRAI::tbox::Arena.
◆ free()
| virtual void SAMRAI::tbox::ScratchArena::free |
( |
void * |
p | ) |
|
|
virtual |
Return memory to the scratch arena pool. The current implementation of ScratchArena simply uses the standard C++ delete operator.
Implements SAMRAI::tbox::Arena.
◆ operator=()
| void SAMRAI::tbox::ScratchArena::operator= |
( |
const ScratchArena & |
| ) |
|
|
private |
◆ align()
| static size_t SAMRAI::tbox::Arena::align |
( |
const size_t |
bytes | ) |
|
|
staticinherited |
Static arena function to compute alignment for memory allocation. Data allocations less than the alignment size are rounded up to the next multiple of the allocation size. All data allocations are aligned on 16 byte boundaries. Thus, a memory allocation of only 9 bytes will actually return a 16 byte chunk of memory.
The documentation for this class was generated from the following file: