summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/common/MemLeakFindOn.h1
-rw-r--r--lib/common/MemLeakFinder.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/common/MemLeakFindOn.h b/lib/common/MemLeakFindOn.h
index c20fe25a..f1113184 100644
--- a/lib/common/MemLeakFindOn.h
+++ b/lib/common/MemLeakFindOn.h
@@ -15,6 +15,7 @@
#ifndef MEMLEAKFINDER_MALLOC_MONITORING_DEFINED
#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
diff --git a/lib/common/MemLeakFinder.h b/lib/common/MemLeakFinder.h
index 3beedbe9..07b52e26 100644
--- a/lib/common/MemLeakFinder.h
+++ b/lib/common/MemLeakFinder.h
@@ -54,7 +54,8 @@ void memleakfinder_notaleak(void *ptr);
void *operator new (size_t size, const char *file, int line);
void *operator new[](size_t size, const char *file, int line);
-// define the malloc functions now, if required
+// Define the malloc functions now, if required. These should match the definitions
+// in MemLeakFindOn.h.
#ifdef MEMLEAKFINDER_FULL_MALLOC_MONITORING
#define malloc(X) memleakfinder_malloc(X, __FILE__, __LINE__)
#define calloc(X, Y) memleakfinder_calloc(X, Y, __FILE__, __LINE__)