KMemoryPool Class Reference

#include <kmemory.h>

List of all members.


Detailed Description

class KMemory pool

Definition at line 220 of file kmemory.h.


Public Member Functions

  KMemoryPool (kSizeT pBlockSize=0, kUInt pBlockCount=0, kUInt pAlignment=0, bool pResizable=true)
  The class constructor.
void  Init (kSizeT pBlockSize, kUInt pBlockCount=0, kUInt pAlignement=0, bool pResizable=true)
  Initiate the memory pool to the given parameters.
void  Clear ()
  Uninitialized memory pool.
void *  Allocate ()
  Allocate or lock for usage a memory block.
void  Free (void *pMemBlock)
  Dispose or unlock the usage of a memory block.

Constructor & Destructor Documentation

KMemoryPool ( kSizeT  pBlockSize = 0,
kUInt  pBlockCount = 0,
kUInt  pAlignment = 0,
bool  pResizable = true  
) [explicit]

The class constructor.

Parameters:
pBlockSize 
pBlockCount 
pAlignment 
pResizable 

Member Function Documentation

void Init ( kSizeT  pBlockSize,
kUInt  pBlockCount = 0,
kUInt  pAlignement = 0,
bool  pResizable = true  
)

Initiate the memory pool to the given parameters.

Parameters:
pBlockSize 
pBlockCount  The blocks size.
pAlignement  Alignment.
pResizable  Is it resizable?

void Clear (  ) 

Uninitialized memory pool.

void* Allocate (  ) 

Allocate or lock for usage a memory block.

Returns:
a memory block.

void Free ( void *  pMemBlock  ) 

Dispose or unlock the usage of a memory block.

Asserting that this pool own this block.

Parameters:
pMemBlock 
KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool
KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool KMemoryPool