torque Torque Game Engine Documentation
TGE Version 1.5.2

FreeListChunker< T > Class Template Reference

#include <dataChunker.h>

Inheritance diagram for FreeListChunker< T >:

Inheritance graph
[legend]


template<class T> class FreeListChunker< T >


Public Member Functions

 FreeListChunker (S32 size=DataChunker::ChunkSize)
T * alloc ()
void free (T *elem)
void freeBlocks ()
 Free all allocated memory blocks.

Private Attributes

S32 numAllocated
S32 elementSize
T * freeListHead

Constructor & Destructor Documentation

template<class T>
FreeListChunker< T >::FreeListChunker ( S32  size = DataChunker::ChunkSize  )  [inline]


Member Function Documentation

template<class T>
T* FreeListChunker< T >::alloc (  )  [inline]

template<class T>
void FreeListChunker< T >::free ( T *  elem  )  [inline]

template<class T>
void FreeListChunker< T >::freeBlocks (  )  [inline]

Free all allocated memory blocks.

This invalidates all pointers returned from alloc().

Reimplemented from DataChunker.


Field Documentation

template<class T>
S32 FreeListChunker< T >::numAllocated [private]

template<class T>
S32 FreeListChunker< T >::elementSize [private]

template<class T>
T* FreeListChunker< T >::freeListHead [private]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen