BArena Class Reference

: A Concrete Class for Dynamic Memory Management More...

#include <BArena.H>

Inheritance diagram for BArena:

Inheritance graph
[legend]
Collaboration diagram for BArena:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

: A Concrete Class for Dynamic Memory Management

This is the simplest dynamic memory management class derived from Arena.

Makes calls to operator new() and operator delete().


Member Function Documentation

void * BArena::alloc ( size_t  sz  )  [virtual]

Allocates a dynamic memory arena of size sz.

Returns a pointer to this memory.

Implements Arena.

void BArena::free ( void *  pt  )  [virtual]

Deletes the arena pointed to by pt.

Implements Arena.

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().


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