![]() |
Clapkit
|
#include "ckMemory.h"#include "ckUtils.h"#include <algorithm>#include <string.h>#include <vector>Classes | |
| struct | CKAllocdMemory |
Functions | |
| CKAllocdMemory | __CKReportAllocation (const char *func, int line, const char *_file, size_t size, bool viaNew) |
| void | __CKReportDeallocation (void *ptr, const char *func, int line, const char *_file, bool viaDelete) |
| void * | __CKNew (const char *func, int line, const char *file, size_t size) |
| void | __CKDelete (void *ptr, const char *func, int line, const char *file) |
| void * | __CKMalloc (const char *func, int line, const char *file, size_t size) |
| void | __CKFree (const char *func, int line, const char *file, void *ptr) |
| void | CKMemoryUsage (size_t *_totalAllocd, size_t *_totalFreed, int *_numOfPtrs) |
| void | CKMemoryDumpLeaks () |
| bool | __CKSafeCopyString (char **dest, const char *src, const char *func, int line, const char *file) |
| void __CKDelete | ( | void * | ptr, |
| const char * | func, | ||
| int | line, | ||
| const char * | file | ||
| ) |
Wrapper for delete used to find potential leaks.
| void __CKFree | ( | const char * | func, |
| int | line, | ||
| const char * | file, | ||
| void * | ptr | ||
| ) |
| void * __CKMalloc | ( | const char * | func, |
| int | line, | ||
| const char * | file, | ||
| size_t | size | ||
| ) |
Wrapper for malloc used to find potential leaks.
| void * __CKNew | ( | const char * | func, |
| int | line, | ||
| const char * | file, | ||
| size_t | size | ||
| ) |
Wrapper for new used to find potential leaks.
| CKAllocdMemory __CKReportAllocation | ( | const char * | func, |
| int | line, | ||
| const char * | _file, | ||
| size_t | size, | ||
| bool | viaNew | ||
| ) |
| void __CKReportDeallocation | ( | void * | ptr, |
| const char * | func, | ||
| int | line, | ||
| const char * | _file, | ||
| bool | viaDelete | ||
| ) |
| bool __CKSafeCopyString | ( | char ** | dest, |
| const char * | src, | ||
| const char * | func, | ||
| int | line, | ||
| const char * | file | ||
| ) |
| void CKMemoryDumpLeaks | ( | ) |
(Try to) print all the leaks to the console.
| void CKMemoryUsage | ( | size_t * | _totalAllocd, |
| size_t * | _totalFreed, | ||
| int * | _numOfPtrs | ||
| ) |
Return the stats about memory usage.