[Box Backup-commit] COMMIT r3624 - box/trunk/lib/common
subversion at boxbackup.org
subversion at boxbackup.org
Sat Aug 8 22:13:49 BST 2015
Author: chris
Date: 2015-08-08 21:13:48 +0000 (Sat, 08 Aug 2015)
New Revision: 3624
Modified:
box/trunk/lib/common/MemLeakFindOn.h
box/trunk/lib/common/MemLeakFinder.h
Log:
Fix memory leak tracking of calloc() allocations
Modified: box/trunk/lib/common/MemLeakFindOn.h
===================================================================
--- box/trunk/lib/common/MemLeakFindOn.h 2015-08-07 21:40:44 UTC (rev 3623)
+++ box/trunk/lib/common/MemLeakFindOn.h 2015-08-08 21:13:48 UTC (rev 3624)
@@ -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
Modified: box/trunk/lib/common/MemLeakFinder.h
===================================================================
--- box/trunk/lib/common/MemLeakFinder.h 2015-08-07 21:40:44 UTC (rev 3623)
+++ box/trunk/lib/common/MemLeakFinder.h 2015-08-08 21:13:48 UTC (rev 3624)
@@ -54,7 +54,8 @@
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__)
More information about the Boxbackup-commit
mailing list