Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

MemPoolObject< S > Union Template Reference

A memory management wrapper around a class S. More...

#include <mempool.h>

Inheritance diagram for MemPoolObject:

Inheritance graph
[legend]
Collaboration diagram for MemPoolObject< S >:

Collaboration graph
[legend]
List of all members.

Public Attributes

data
MemPoolObject< S > * admin_next
int admin_length

Detailed Description

template<class S>
union MemPoolObject< S >

A memory management wrapper around a class S.

The wrapper adds two admin data members to S, as a union. These members allow the class MemPool<S> to keep track of free allocated memory blocks in a linked list.

If you need a large number of small (one to two element) arrays of type S, wrap S as a MemPoolObject<S> and allocate memory using a MemPool<S> object. Not useful if sizeof(S) < 4.

Definition at line 141 of file mempool.h.


Member Data Documentation

template<class S>
int MemPoolObject< S >::admin_length
 

Definition at line 144 of file mempool.h.

Referenced by MemPool< S >::Allocate(), MemPool< S >::allocate_block2(), MemPool< S >::Deallocate(), and MemPool< S >::FreeBlocks2().

template<class S>
MemPoolObject<S>* MemPoolObject< S >::admin_next
 

Definition at line 143 of file mempool.h.

Referenced by MemPool< S >::Allocate(), MemPool< S >::allocate_block1(), MemPool< S >::allocate_block2(), MemPool< S >::Deallocate(), MemPool< S >::FreeBlocks1(), and MemPool< S >::FreeBlocks2().

template<class S>
S MemPoolObject< S >::data
 

Definition at line 142 of file mempool.h.

Referenced by WebNode::AppendFromLink().


Generated on Wed May 29 11:37:26 2002 for MarkovPR by doxygen1.2.15