#include <source/toolbox/memory/ScratchArena.h>
Inheritance diagram for SAMRAI::tbox::ScratchArena:
Public Member Functions | |
ScratchArena () | |
virtual | ~ScratchArena () |
virtual void * | alloc (const size_t bytes) |
virtual void | free (void *p) |
SAMRAI::tbox::ScratchArena::ScratchArena | ( | ) | [inline] |
The constructor for the scratch memory arena.
SAMRAI::tbox::ScratchArena::~ScratchArena | ( | ) | [virtual] |
The virtual destructor for the scratch memory arena.
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.
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.