AMROC Main     Blockstructured Adaptive Mesh Refinement in object-oriented C++


Main Page   Class Hierarchy   Compound List   File List  

fastAlloc Class Reference

This file defines a simple memory block allocator for fixed-size memory blocks. More...

#include <fastAlloc.h>

List of all members.

Public Methods

 fastAlloc (const unsigned int size, const unsigned int atatime)
 Creates a class instance which returns blocks of size bytes. More...

 ~fastAlloc ()
void * alloc ()
void free (void *block)


Detailed Description

This file defines a simple memory block allocator for fixed-size memory blocks.

This class is similar to the one described in Bjarne Stroustrup's "The C++ Programming Language", Second Edition. Adapted from implementation by Scott Kohn (skohn@cs.ucsd.edu).

Author:
Manish Parashar

Definition at line 18 of file fastAlloc.h.


Constructor & Destructor Documentation

fastAlloc::fastAlloc const unsigned int    size,
const unsigned int    atatime
 

Creates a class instance which returns blocks of size bytes.

When new blocks are allocated, atatime blocks are allocated. We want to align the data on powers-of-two boundaries 4, 8, or 16 since many architectures restrict the address of some data objects such as doubles.

Definition at line 32 of file fastAlloc.C.


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


Quickstart     Users Guide     Programmers Reference     Installation      Examples     Download



AMROC Main      Home      Contact
last update: 06/01/04