#include <BArena.H>
Public Member Functions | |
virtual void * | alloc (size_t sz) |
Allocates a dynamic memory arena of size sz. | |
virtual void | free (void *pt) |
Deletes 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. |
This is the simplest dynamic memory management class derived from Arena.
Makes calls to operator new() and operator delete().
void * BArena::alloc | ( | size_t | sz | ) | [virtual] |
void BArena::free | ( | void * | pt | ) | [virtual] |
size_t Arena::align | ( | size_t | sz | ) | [static, inherited] |
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().