Class CGUIMemLeakDetection for analyzing the use of memory and detecting the memory leaks. More...
#include <GUIMemLeakDetection.h>
Public Member Functions | |
const eC_UInt | GetCurrentlyLargestObject () const |
const eC_UInt | GetLargestObject () const |
const eC_UInt | GetMaxObject () const |
const eC_UInt | GetUsedMemory () const |
void | SetActive (const eC_Bool &bActive) |
void | ShowResults () |
void | WriteResultsToFile (const eC_Char *sFilename="MemoryAnalysisResults.log", const eC_Bool &bAsTable=true) |
Static Public Member Functions | |
static CGUIMemLeakDetection & | GetInstance () |
Friends | |
void | Guiliani_delete (void *pMemory, const char *pFile, int iLine, const char *pFunction) |
void | Guiliani_deleteArray (void *pMemory, const char *pFile, int iLine, const char *pFunction) |
void | Guiliani_free (void *pMemory, const char *pFile, int iLine, const char *pFunction) |
void * | Guiliani_malloc (size_t uiSize, const char *pFile, int iLine, const char *pFunction) |
void * | Guiliani_new (size_t uiSize, const char *pFile, int iLine, const char *pFunction) |
void * | Guiliani_newArray (size_t uiSize, const char *pFile, int iLine, const char *pFunction) |
void * | Guiliani_realloc (void *pMemory, size_t uiSize, const char *pFile, int iLine, const char *pFunction) |
void | operator delete (void *Memory) throw () |
void | operator delete[] (void *Memory) throw () |
void * | operator new (size_t uiSize, const char *pcFile, int iLine, const char *pcFunction) |
void * | operator new[] (size_t uiSize, const char *pcFile, int iLine, const char *pcFunction) |
Class CGUIMemLeakDetection for analyzing the use of memory and detecting the memory leaks.
Include GUIMemLeakFuntions.h in the same file where the main() function is implemented. To show the results of leak detection call ShowResults() at the end. Don't use the new operator in this class, otherwise there will be a recursive new operator call until you'll have a stack overflow and the application crashes!
const eC_UInt CGUIMemLeakDetection::GetCurrentlyLargestObject | ( | ) | const |
Get the memory used by the largest object
|
inlinestatic |
Method which returns the instance of this class.
const eC_UInt CGUIMemLeakDetection::GetLargestObject | ( | ) | const |
Get the memory used by the largest object
const eC_UInt CGUIMemLeakDetection::GetMaxObject | ( | ) | const |
Get the max amount of memory ever allocated during runtime
const eC_UInt CGUIMemLeakDetection::GetUsedMemory | ( | ) | const |
Get the currently amount of used memory
void CGUIMemLeakDetection::SetActive | ( | const eC_Bool & | bActive) |
Set enhanced memory-profiling active
bActive |
void CGUIMemLeakDetection::ShowResults | ( | ) |
Method which shows results on screen uses GUILOG.
void CGUIMemLeakDetection::WriteResultsToFile | ( | const eC_Char * | sFilename = "MemoryAnalysisResults.log" , |
const eC_Bool & | bAsTable = true |
||
) |
Method which writes the results of the analysis to a file.
sFilename | Filename with path for the results |
bAsTable | if true the output will have csv-format |
|
friend |
memory-tracing function used with operator delete
pFile | File name |
iLine | Line in file |
pFunction | Name of calling function |
pMemory | Pointer to allocated memory |
|
friend |
memory-tracing function used with operator delete[]
pFile | File name |
iLine | Line in file |
pFunction | Name of calling function |
pMemory | Pointer to allocated memory |
|
friend |
memory-tracing function used with free()
pFile | File name |
iLine | Line in file |
pFunction | Name of calling function |
pMemory | Pointer to allocated memory |
|
friend |
memory-tracing function used with malloc()
pFile | File name |
iLine | Line in file |
pFunction | Name of calling function |
uiSize | Size |
|
friend |
memory-tracing function used with operator new
pFile | File name |
iLine | Line in file |
pFunction | Name of calling function |
uiSize | Size |
|
friend |
memory-tracing function used with operator new[]
pFile | File name |
iLine | Line in file |
pFunction | Name of calling function |
uiSize | Size |
|
friend |
memory-tracing function used with realloc()
pFile | File name |
iLine | Line in file |
pFunction | Name of calling function |
pMemory | Pointer to allocated memory |
uiSize | Size |
|
friend |
delete operator
Memory |
|
friend |
delete operator[]
Memory |
|
friend |
new operator
uiSize | |
pcFile | |
iLine | |
pcFunction |
|
friend |
new operator[]
uiSize | |
pcFile | |
iLine | |
pcFunction |