diff options
author | Chris Wilson <chris+github@qwirx.com> | 2013-09-19 23:07:36 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2013-09-19 23:07:36 +0000 |
commit | f2c9e2fbd251736b50f88cea07e8a97635b5c6fa (patch) | |
tree | 5ec1dc3e8f841a526a9fed256d03b3f5d259ad7f /lib/common/MemLeakFinder.h | |
parent | 93966139dbfc1ee289718087c4a232dd44d337f7 (diff) |
Add calloc() support to memory leak finder.
Diffstat (limited to 'lib/common/MemLeakFinder.h')
-rw-r--r-- | lib/common/MemLeakFinder.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/common/MemLeakFinder.h b/lib/common/MemLeakFinder.h index 91c93217..1a2cf90c 100644 --- a/lib/common/MemLeakFinder.h +++ b/lib/common/MemLeakFinder.h @@ -28,6 +28,7 @@ class MemLeakSuppressionGuard extern "C" { void *memleakfinder_malloc(size_t size, const char *file, int line); + void *memleakfinder_calloc(size_t blocks, size_t size, const char *file, int line); void *memleakfinder_realloc(void *ptr, size_t size); void memleakfinder_free(void *ptr); } @@ -56,6 +57,7 @@ void *operator new[](size_t size, const char *file, int line); // define the malloc functions now, if required #ifdef MEMLEAKFINDER_FULL_MALLOC_MONITORING #define malloc(X) memleakfinder_malloc(X, __FILE__, __LINE__) + #define calloc(X, Y) memleakfinder_calloc(X, Y, __FILE__, __LINE__) #define realloc memleakfinder_realloc #define free memleakfinder_free #define MEMLEAKFINDER_MALLOC_MONITORING_DEFINED |