KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Private Attributes | List of all members
KVMemoryPool Class Reference

Managed pool of memory.

Created by KVClassFactory on Fri Oct 1 16:50:02 2010 Author: John Frankland,,,,

Definition at line 14 of file KVMemoryPool.h.

Public Member Functions

 KVMemoryPool (int nchunks, size_t bytes)
 Create nchunks chunks each of size 'bytes'. More...
 
virtual ~KVMemoryPool ()
 Destructor. More...
 
voidGetMemory (size_t bytes)
 return pointer to memory of size 'bytes' More...
 
void Print ()
 

Private Attributes

size_t fChunkSize
 size of chunks in bytes More...
 
KVMemoryChunkfFirst
 first chunk in pool More...
 
KVMemoryChunkfLast
 first chunk in pool More...
 
KVMemoryChunkfLastChunkUsed
 

#include <KVMemoryPool.h>

Constructor & Destructor Documentation

◆ KVMemoryPool()

KVMemoryPool::KVMemoryPool ( int  nchunks,
size_t  bytes 
)

Create nchunks chunks each of size 'bytes'.

Definition at line 13 of file KVMemoryPool.cpp.

◆ ~KVMemoryPool()

KVMemoryPool::~KVMemoryPool ( )
virtual

Destructor.

Definition at line 65 of file KVMemoryPool.cpp.

Member Function Documentation

◆ GetMemory()

void * KVMemoryPool::GetMemory ( size_t  bytes)

return pointer to memory of size 'bytes'

Definition at line 32 of file KVMemoryPool.cpp.

◆ Print()

void KVMemoryPool::Print ( void  )

Definition at line 81 of file KVMemoryPool.cpp.

Member Data Documentation

◆ fChunkSize

size_t KVMemoryPool::fChunkSize
private

size of chunks in bytes

Definition at line 18 of file KVMemoryPool.h.

◆ fFirst

KVMemoryChunk* KVMemoryPool::fFirst
private

first chunk in pool

Definition at line 15 of file KVMemoryPool.h.

◆ fLast

KVMemoryChunk* KVMemoryPool::fLast
private

first chunk in pool

Definition at line 16 of file KVMemoryPool.h.

◆ fLastChunkUsed

KVMemoryChunk* KVMemoryPool::fLastChunkUsed
private

Definition at line 17 of file KVMemoryPool.h.


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