Arena Class Reference

: A Virtual Base Class for Dynamic Memory Management More...

#include <Arena.H>

Inheritance diagram for Arena:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Arena ()
virtual void * alloc (size_t sz)=0
 Allocate a dynamic memory arena of size sz.
virtual void free (void *pt)=0
 A pure virtual function for deleting the arena pointed to by pt.

Static Public Member Functions

static size_t align (size_t sz)
 Given a minimum required arena size of sz bytes, this returns the next largest arena size that will hold an integral number of objects of the largest of the types void*, long, double and function pointer.

Classes

union  Word


Detailed Description

: A Virtual Base Class for Dynamic Memory Management

This is a virtual base class for objects that manage their own dynamic memory allocation. Since it is a virtual base class, you have to derive something from it to use it.


Constructor & Destructor Documentation

Arena::~Arena (  )  [virtual]


Member Function Documentation

virtual void* Arena::alloc ( size_t  sz  )  [pure virtual]

Allocate a dynamic memory arena of size sz.

A pointer to this memory should be returned.

Implemented in BArena, and CArena.

Referenced by FabArrayCopyDescriptor< FAB >::CollectData(), FabArray< FAB >::copy(), and BaseFab< T >::define().

virtual void Arena::free ( void *  pt  )  [pure virtual]

A pure virtual function for deleting the arena pointed to by pt.

Implemented in BArena, and CArena.

Referenced by FabArrayCopyDescriptor< FAB >::CollectData(), FabArray< FAB >::copy(), and BaseFab< T >::undefine().

size_t Arena::align ( size_t  sz  )  [static]

Given a minimum required arena size of sz bytes, this returns the next largest arena size that will hold an integral number of objects of the largest of the types void*, long, double and function pointer.

Referenced by CArena::alloc(), and CArena::CArena().


The documentation for this class was generated from the following files:

Generated on Fri Nov 21 10:11:00 2008 for AMRParticlePaths by  doxygen 1.5.5