12#ifndef GUIMEMLEAKDETECTION__H_
13#define GUIMEMLEAKDETECTION__H_
18#define LEAK_DETECTION CGUIMemLeakDetection::GetInstance()
69 friend void*
Guiliani_malloc(
size_t uiSize,
const char* pFile,
int iLine,
const char* pFunction);
70 friend void Guiliani_free(
void* pMemory,
const char* pFile,
int iLine,
const char* pFunction);
71 friend void*
Guiliani_realloc(
void* pMemory,
size_t uiSize,
const char* pFile,
int iLine,
const char* pFunction);
72 friend void*
Guiliani_new(
size_t uiSize,
const char* pFile,
int iLine,
const char* pFunction);
73 friend void*
Guiliani_newArray(
size_t uiSize,
const char* pFile,
int iLine,
const char* pFunction);
74 friend void Guiliani_delete(
void* pMemory,
const char* pFile,
int iLine,
const char* pFunction);
84 friend void*
operator new(
size_t uiSize,
const char* pcFile,
int iLine,
const char* pcFunction);
93 friend void*
operator new[](
size_t uiSize,
const char* pcFile,
int iLine,
const char* pcFunction);
98 friend void operator delete(
void* Memory)
throw();
103 friend void operator delete[](
void* Memory)
throw();
109 void WriteResultsToFile(
const eC_Char* sFilename =
"MemoryAnalysisResults.log",
const eC_Bool& bAsTable =
true);
145#ifdef GUILIANI_MEMORY_ALLOCATION_LOGGING
150 return s_MemLeakDetection;
163 eC_UInt m_uiMagicNumber;
167 size_t m_uiObjectSize;
185 m_pMemoryAddress = NULL;
187 m_bIsArrayAlloc =
false;
193 bool operator==(
const BlockInfo_t& kValue)
const
195 return m_pMemoryAddress == kValue.m_pMemoryAddress;
199 const eC_Char* m_pcFilename;
205 const eC_Char* m_pcFunction;
208 void* m_pMemoryAddress;
211 size_t m_uiObjectSize;
214 eC_Bool m_bIsArrayAlloc;
219 static const eC_UInt ms_cuiMagicNr = 395743214;
225 const eC_Char* pFile,
227 const eC_Char* pFunction,
228 const eC_Char* pNewTypeName,
234 const eC_Char* pFile,
236 const eC_Char* pFunction,
237 const eC_Char* pDeleteTypeName,
244 const eC_Char* pFile,
246 const eC_Char* pFunction);
266 eC_File* m_pkOutputFile;
269 const eC_Bool m_bLogState;
273 eC_UInt m_uiMemoryAllocSteps;
276 eC_UInt m_uiMemoryAllocStepsCounterDelete;
279 eC_UInt m_uiMemoryAllocStepsCounterNew;
282 BlockInfo_t** m_kList;
284 eC_UInt m_uiCurrentListSize;
287 eC_UInt m_uiFirstFreeIndexInList;
290 size_t m_uiUsedMemory;
296 size_t m_uiCurrentlyLargestObject;
299 size_t m_uiLargestObject;
302 eC_Int m_iAllocatedBlockCount;
Class CGUIMemLeakDetection for analyzing the use of memory and detecting the memory leaks.
Definition: GUIMemLeakDetection.h:63
const eC_UInt GetUsedMemory() const
friend void Guiliani_free(void *pMemory, const char *pFile, int iLine, const char *pFunction)
const eC_UInt GetMaxObject() const
void SetActive(const eC_Bool &bActive)
const eC_UInt GetLargestObject() const
friend void * Guiliani_malloc(size_t uiSize, const char *pFile, int iLine, const char *pFunction)
friend void Guiliani_deleteArray(void *pMemory, const char *pFile, int iLine, const char *pFunction)
friend void * Guiliani_newArray(size_t uiSize, const char *pFile, int iLine, const char *pFunction)
friend void * Guiliani_new(size_t uiSize, const char *pFile, int iLine, const char *pFunction)
friend void Guiliani_delete(void *pMemory, const char *pFile, int iLine, const char *pFunction)
static CGUIMemLeakDetection & GetInstance()
Definition: GUIMemLeakDetection.h:143
const eC_UInt GetCurrentlyLargestObject() const
friend void * Guiliani_realloc(void *pMemory, size_t uiSize, const char *pFile, int iLine, const char *pFunction)
void WriteResultsToFile(const eC_Char *sFilename="MemoryAnalysisResults.log", const eC_Bool &bAsTable=true)
bool operator==(const NSmartPtr::SharedPtr< C1 > &a, const NSmartPtr::SharedPtr< C2 > &b)
Definition: SharedPtr.h:240