doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
idDynamicBlockAlloc< type, baseBlockSize, minBlockSize > Class Template Reference

#include <Heap.h>

Public Member Functions

 idDynamicBlockAlloc (void)
 
 ~idDynamicBlockAlloc (void)
 
void Init (void)
 
void Shutdown (void)
 
void SetFixedBlocks (int numBlocks)
 
void SetLockMemory (bool lock)
 
void FreeEmptyBaseBlocks (void)
 
typeAlloc (const int num)
 
typeResize (type *ptr, const int num)
 
void Free (type *ptr)
 
const char * CheckMemory (const type *ptr) const
 
int GetNumBaseBlocks (void) const
 
int GetBaseBlockMemory (void) const
 
int GetNumUsedBlocks (void) const
 
int GetUsedBlockMemory (void) const
 
int GetNumFreeBlocks (void) const
 
int GetFreeBlockMemory (void) const
 
int GetNumEmptyBaseBlocks (void) const
 

Private Member Functions

void Clear (void)
 
idDynamicBlock< type > * AllocInternal (const int num)
 
idDynamicBlock< type > * ResizeInternal (idDynamicBlock< type > *block, const int num)
 
void FreeInternal (idDynamicBlock< type > *block)
 
void LinkFreeInternal (idDynamicBlock< type > *block)
 
void UnlinkFreeInternal (idDynamicBlock< type > *block)
 
void CheckMemory (void) const
 

Private Attributes

idDynamicBlock< type > * firstBlock
 
idDynamicBlock< type > * lastBlock
 
idBTree< idDynamicBlock< type >
, int, 4 > 
freeTree
 
bool allowAllocs
 
bool lockMemory
 
int numBaseBlocks
 
int baseBlockMemory
 
int numUsedBlocks
 
int usedBlockMemory
 
int numFreeBlocks
 
int freeBlockMemory
 
int numAllocs
 
int numResizes
 
int numFrees
 

Detailed Description

template<class type, int baseBlockSize, int minBlockSize>
class idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >

Definition at line 390 of file Heap.h.

Constructor & Destructor Documentation

template<class type , int baseBlockSize, int minBlockSize>
idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::idDynamicBlockAlloc ( void  )

Definition at line 446 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::~idDynamicBlockAlloc ( void  )

Definition at line 451 of file Heap.h.

Member Function Documentation

template<class type , int baseBlockSize, int minBlockSize>
type * idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::Alloc ( const int  num)

Definition at line 570 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
idDynamicBlock< type > * idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::AllocInternal ( const int  num)
private

Definition at line 714 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
const char * idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::CheckMemory ( const type ptr) const

Definition at line 652 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::CheckMemory ( void  ) const
private

Definition at line 870 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::Clear ( void  )
private

Definition at line 692 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::Free ( type ptr)

Definition at line 631 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::FreeEmptyBaseBlocks ( void  )

Definition at line 523 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::FreeInternal ( idDynamicBlock< type > *  block)
private

Definition at line 816 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::GetBaseBlockMemory ( void  ) const
inline

Definition at line 407 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::GetFreeBlockMemory ( void  ) const
inline

Definition at line 411 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::GetNumBaseBlocks ( void  ) const
inline

Definition at line 406 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::GetNumEmptyBaseBlocks ( void  ) const

Definition at line 556 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::GetNumFreeBlocks ( void  ) const
inline

Definition at line 410 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::GetNumUsedBlocks ( void  ) const
inline

Definition at line 408 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::GetUsedBlockMemory ( void  ) const
inline

Definition at line 409 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::Init ( void  )

Definition at line 456 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
ID_INLINE void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::LinkFreeInternal ( idDynamicBlock< type > *  block)
private

Definition at line 855 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
type * idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::Resize ( type ptr,
const int  num 
)

Definition at line 599 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
idDynamicBlock< type > * idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::ResizeInternal ( idDynamicBlock< type > *  block,
const int  num 
)
private

Definition at line 750 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::SetFixedBlocks ( int  numBlocks)

Definition at line 485 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::SetLockMemory ( bool  lock)

Definition at line 518 of file Heap.h.

template<class type , int baseBlockSize, int minBlockSize>
void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::Shutdown ( void  )

Definition at line 461 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
ID_INLINE void idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::UnlinkFreeInternal ( idDynamicBlock< type > *  block)
private

Definition at line 862 of file Heap.h.

Member Data Documentation

template<class type, int baseBlockSize, int minBlockSize>
bool idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::allowAllocs
private

Definition at line 418 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::baseBlockMemory
private

Definition at line 426 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
idDynamicBlock<type>* idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::firstBlock
private

Definition at line 415 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::freeBlockMemory
private

Definition at line 430 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
idBTree<idDynamicBlock<type>,int,4> idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::freeTree
private

Definition at line 417 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
idDynamicBlock<type>* idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::lastBlock
private

Definition at line 416 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
bool idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::lockMemory
private

Definition at line 419 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::numAllocs
private

Definition at line 432 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::numBaseBlocks
private

Definition at line 425 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::numFreeBlocks
private

Definition at line 429 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::numFrees
private

Definition at line 434 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::numResizes
private

Definition at line 433 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::numUsedBlocks
private

Definition at line 427 of file Heap.h.

template<class type, int baseBlockSize, int minBlockSize>
int idDynamicBlockAlloc< type, baseBlockSize, minBlockSize >::usedBlockMemory
private

Definition at line 428 of file Heap.h.


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