#include <Arena.H>
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 |
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.
Arena::~Arena | ( | ) | [virtual] |
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().