KHungryAllocator Class Reference

#include <kcontainerallocators.h>

List of all members.


Detailed Description

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 117 of file kcontainerallocators.h.


Public Member Functions

  KHungryAllocator (size_t pRecordSize)
  KHungryAllocator (const KHungryAllocator &pOther)
  ~KHungryAllocator ()
void  Reserve (size_t const pRecordCount)
void *  AllocateRecords (size_t const pRecordCount=1)
void  FreeMemory (void *pRecord)
size_t  GetRecordSize () const
KHungryAllocator operator= (const KHungryAllocator &pOther)

Classes

class   MemoryBlock

Constructor & Destructor Documentation

KHungryAllocator ( size_t  pRecordSize  )  [inline]

Definition at line 120 of file kcontainerallocators.h.

KHungryAllocator ( const KHungryAllocator pOther  )  [inline]

Definition at line 127 of file kcontainerallocators.h.

~KHungryAllocator (  )  [inline]

Definition at line 134 of file kcontainerallocators.h.

References FbxSdkDelete().


Member Function Documentation

void Reserve ( size_t const   pRecordCount  )  [inline]

Definition at line 146 of file kcontainerallocators.h.

Referenced by AllocateRecords().

void* AllocateRecords ( size_t const   pRecordCount = 1  )  [inline]

Definition at line 154 of file kcontainerallocators.h.

References NULL, and Reserve().

void FreeMemory ( void *  pRecord  )  [inline]

Definition at line 179 of file kcontainerallocators.h.

size_t GetRecordSize (  )  const [inline]

Definition at line 184 of file kcontainerallocators.h.

KHungryAllocator& operator= ( const KHungryAllocator pOther  )  [inline]

Definition at line 189 of file kcontainerallocators.h.

References mRecordSize.

KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator
KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator KHungryAllocator