Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Classes | Public Member Functions | Private Member Functions | Private Attributes
concepts::Pool< T > Class Template Reference

Pool for blockwise memory allocation. More...

#include <pool.hh>

Inheritance diagram for concepts::Pool< T >:
Inheritance graph
[legend]
Collaboration diagram for concepts::Pool< T >:
Collaboration graph
[legend]

List of all members.

Classes

union  link

Public Member Functions

T * alloc ()
 Returns a pointer to a available location.
float memory () const
 Pool (unsigned sz)
 Constructor.
 ~Pool ()

Private Member Functions

void operator= (Pool &)
 Pool (Pool &)

Private Attributes

void * blk
const unsigned blkSz
unsigned free
 Stores the number of free entries.
T * next

Detailed Description

template<class T>
class concepts::Pool< T >

Pool for blockwise memory allocation.

A chunk of memory is allocated and returned piecewise. If all space is used up, new space is allocated.

Definition at line 22 of file pool.hh.


Constructor & Destructor Documentation

template<class T>
concepts::Pool< T >::Pool ( Pool< T > &  ) [private]
template<class T>
concepts::Pool< T >::Pool ( unsigned  sz) [inline]

Constructor.

Definition at line 41 of file pool.hh.

template<class T >
concepts::Pool< T >::~Pool ( )

Definition at line 54 of file pool.hh.


Member Function Documentation

template<class T >
T * concepts::Pool< T >::alloc ( )

Returns a pointer to a available location.

If needed, a new chunk is allocated.

Definition at line 62 of file pool.hh.

template<class T >
float concepts::Pool< T >::memory ( ) const

Definition at line 72 of file pool.hh.

template<class T>
void concepts::Pool< T >::operator= ( Pool< T > &  ) [private]

Member Data Documentation

template<class T>
void* concepts::Pool< T >::blk [private]

Definition at line 29 of file pool.hh.

template<class T>
const unsigned concepts::Pool< T >::blkSz [private]

Definition at line 28 of file pool.hh.

template<class T>
unsigned concepts::Pool< T >::free [private]

Stores the number of free entries.

Definition at line 32 of file pool.hh.

template<class T>
T* concepts::Pool< T >::next [private]

Definition at line 34 of file pool.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)