KaliVeda
Toolkit for HIC analysis
KVMemoryPool.h
1 
4 #ifndef __KVMEMORYPOOL_H
5 #define __KVMEMORYPOOL_H
6 
7 #include "KVMemoryChunk.h"
8 
15 class KVMemoryPool {
16  KVMemoryChunk* fFirst;
17  KVMemoryChunk* fLast;
18  KVMemoryChunk* fLastChunkUsed;
19  size_t fChunkSize;
20 
21 public:
22  KVMemoryPool(int nchunks, size_t bytes);
23  virtual ~KVMemoryPool();
24 
25  void* GetMemory(size_t bytes);
26 
27  void Print();
28 
29  ClassDef(KVMemoryPool, 0) //Memory pool
30 };
31 
32 #endif
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t bytes
Memory handled by KVMemoryPool.
Definition: KVMemoryChunk.h:15
Managed pool of memory.
Definition: KVMemoryPool.h:15
void * GetMemory(size_t bytes)
return pointer to memory of size 'bytes'
virtual ~KVMemoryPool()
Destructor.
KVMemoryPool(int nchunks, size_t bytes)
Create nchunks chunks each of size 'bytes'.