FbxHungryAllocator Class Reference
         
    
#include <fbxcontainerallocators.h>
This allocator only frees the allocated memory when it is deleted. 
This is a good allocator for building dictionaries, where we only add things to a container, but never remove them. 
Definition at line 82 of file fbxcontainerallocators.h.
 
Definition at line 92 of file fbxcontainerallocators.h.
   93         mRecordSize(pOther.mRecordSize),
 
   94         mRecordPoolSize(pOther.mRecordPoolSize),
 
 
 
 
Definition at line 99 of file fbxcontainerallocators.h.
  101         MemoryBlock* lCurrent = mData;
 
  102         MemoryBlock* lNext = lCurrent ? lCurrent->mNextBlock : 0;
 
  107             lNext = lCurrent ? lCurrent->mNextBlock : 0;
 
void FbxDelete(T *p)
Deletion policy for pointer template classes that uses the FbxDelete() function. 
 
 
 
 
  
  
      
        
          | void Reserve  | 
          ( | 
          const size_t  | 
          pRecordCount | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 111 of file fbxcontainerallocators.h.
  113         MemoryBlock* lMem = FbxNew< MemoryBlock >(pRecordCount* mRecordSize);
 
  114         lMem->mNextBlock = mData;
 
  116         mRecordPoolSize += pRecordCount;
 
 
 
 
  
  
      
        
          | void* AllocateRecords  | 
          ( | 
          const size_t  | 
          pRecordCount = 1 | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 119 of file fbxcontainerallocators.h.
  121         MemoryBlock* lBlock = mData;
 
  122         void* lRecord = 
NULL;
 
  124         while( (lBlock != 
NULL) && ((lRecord = lBlock->GetChunk(pRecordCount * mRecordSize)) == 
NULL) )
 
  126             lBlock = lBlock->mNextBlock;
 
  129         if( lRecord == 
NULL )
 
  131             size_t lNumRecordToAllocate = mRecordPoolSize / 8 == 0 ? 2 : mRecordPoolSize / 8;
 
  132             if( lNumRecordToAllocate < pRecordCount )
 
  134                 lNumRecordToAllocate = pRecordCount;
 
void Reserve(const size_t pRecordCount)
 
void * AllocateRecords(const size_t pRecordCount=1)
 
 
 
 
  
  
      
        
          | void FreeMemory  | 
          ( | 
          void *  | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | size_t GetRecordSize  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
Definition at line 152 of file fbxcontainerallocators.h.
  154         if( 
this != &pOther )
 
  159             if( mRecordSize < pOther.mRecordSize )
 
  164             mRecordSize = pOther.mRecordSize;
 
 
 
 
The documentation for this class was generated from the following file: