KaliVeda
Toolkit for HIC analysis
KVMemoryChunk.h
1 
4 #ifndef __KVMEMORYCHUNK_H
5 #define __KVMEMORYCHUNK_H
6 #include "Rtypes.h"
7 #include <cstdio>
8 
16  char* fMemory;
17  size_t fSize;
18  size_t fUsed;
20 
21 public:
22  KVMemoryChunk();
23  KVMemoryChunk(size_t);
24  virtual ~KVMemoryChunk();
25 
26  void* GetMemory(size_t);
27 
29  {
30  fNext = n;
31  };
33  {
34  return fNext;
35  };
36 
37  void Print();
38 
39  ClassDef(KVMemoryChunk, 0) //Memory chunk in pool
40 };
41 
42 #endif
#define ClassDef(name, id)
Memory handled by KVMemoryPool.
Definition: KVMemoryChunk.h:15
KVMemoryChunk * fNext
next chunk of memory
Definition: KVMemoryChunk.h:19
virtual ~KVMemoryChunk()
Destructor.
size_t fSize
size of chunk in bytes
Definition: KVMemoryChunk.h:17
KVMemoryChunk * Next() const
Definition: KVMemoryChunk.h:32
void SetNext(KVMemoryChunk *n)
Definition: KVMemoryChunk.h:28
char * fMemory
pointer to start of chunk
Definition: KVMemoryChunk.h:16
void * GetMemory(size_t)
size_t fUsed
memory used in bytes
Definition: KVMemoryChunk.h:18
KVMemoryChunk()
Default constructor.
const Int_t n