IBAMR  IBAMR version 0.19.
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | List of all members
SAMRAI::tbox::StandardArena Class Reference

#include <tbox/StandardArena.h>

Inheritance diagram for SAMRAI::tbox::StandardArena:
Inheritance graph
[legend]

Public Member Functions

 StandardArena ()
 
virtual ~StandardArena ()
 
virtual void * alloc (const size_t bytes)
 
virtual void free (void *p)
 

Static Public Member Functions

static size_t align (const size_t bytes)
 

Private Types

enum  { ArenaAllocationAlignment = 16 }
 

Private Member Functions

 StandardArena (const StandardArena &)
 
void operator= (const StandardArena &)
 

Detailed Description

Class StandardArena is intended for standard memory allocation requests. It currently uses the standard C++ new and delete operators for memory allocation and deallocation.

See also
tbox::Arena

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
privateinherited
Enumerator
ArenaAllocationAlignment 

Constructor & Destructor Documentation

◆ StandardArena() [1/2]

SAMRAI::tbox::StandardArena::StandardArena ( )

The constructor for the standard memory arena.

◆ ~StandardArena()

virtual SAMRAI::tbox::StandardArena::~StandardArena ( )
virtual

The virtual destructor for the standard memory arena.

◆ StandardArena() [2/2]

SAMRAI::tbox::StandardArena::StandardArena ( const StandardArena )
private

Member Function Documentation

◆ alloc()

virtual void* SAMRAI::tbox::StandardArena::alloc ( const size_t  bytes)
virtual

Allocate memory from the standard memory arena. The current implementation of StandardArena uses the standard C++ new operator.

Implements SAMRAI::tbox::Arena.

◆ free()

virtual void SAMRAI::tbox::StandardArena::free ( void *  p)
virtual

Return memory to the standard arena pool. The current implementation of StandardArena uses the standard C++ delete operator.

Implements SAMRAI::tbox::Arena.

◆ operator=()

void SAMRAI::tbox::StandardArena::operator= ( const StandardArena )
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: