|
IBAMR
IBAMR version 0.19.
|
#include <tbox/Arena.h>

Public Member Functions | |
| Arena () | |
| virtual | ~Arena () |
| virtual void * | alloc (const size_t bytes)=0 |
| virtual void | free (void *p)=0 |
Static Public Member Functions | |
| static size_t | align (const size_t bytes) |
Private Types | |
| enum | { ArenaAllocationAlignment = 16 } |
Private Member Functions | |
| Arena (const Arena &) | |
| void | operator= (const Arena &) |
Class Arena is an abstract base class for specialized dynamic memory management. The arena'' is a user-controlled portion of memory that is accessed via a specialnew'' command. Memory allocated in this manner must be returned to the arena using the arena free() function; C++ does not (unfortunately) understand a corresponding form of delete. However, memory management classes such as Pointer and Array can alleviate this burden.
| SAMRAI::tbox::Arena::Arena | ( | ) |
The constructor for Arena.
|
virtual |
The virtual destructor for Arena.
|
private |
|
pure virtual |
Abstract virtual function to allocate memory from the arena.
Implemented in SAMRAI::tbox::FixedArena, SAMRAI::tbox::ScratchArena, and SAMRAI::tbox::StandardArena.
|
pure virtual |
Abstract virtual function to return memory to the arena memory pool.
Implemented in SAMRAI::tbox::FixedArena, SAMRAI::tbox::StandardArena, and SAMRAI::tbox::ScratchArena.
|
static |
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.
|
private |
1.8.17