summaryrefslogtreecommitdiff
path: root/navit/debug.h
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-06-23 13:06:57 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-06-23 13:06:57 +0000
commit7770f84ee85b0f3567710e6a29c4e7376f1e1278 (patch)
tree49ce72e473ba9877d3c3b19f48affc49fe787aa6 /navit/debug.h
parent9cd187688ce19fe46fd954baf48f5cadb77cc6a0 (diff)
downloadnavit-svn-7770f84ee85b0f3567710e6a29c4e7376f1e1278.tar.gz
Add:Core:Better support for debugging memory leaks
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3386 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/debug.h')
-rw-r--r--navit/debug.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/navit/debug.h b/navit/debug.h
index 6b41a7a7..7a041c9f 100644
--- a/navit/debug.h
+++ b/navit/debug.h
@@ -38,6 +38,9 @@ extern int debug_level;
#undef g_new0
#define g_new(type, size) (type *)debug_malloc(__FILE__,__LINE__,__PRETTY_FUNCTION__,sizeof(type)*(size))
#define g_new0(type, size) (type *)debug_malloc0(__FILE__,__LINE__,__PRETTY_FUNCTION__,sizeof(type)*(size))
+#define g_malloc(size) debug_malloc(__FILE__,__LINE__,__PRETTY_FUNCTION__,(size))
+#define g_malloc0(size) debug_malloc0(__FILE__,__LINE__,__PRETTY_FUNCTION__,(size))
+#define g_realloc(ptr,size) debug_realloc(__FILE__,__LINE__,__PRETTY_FUNCTION__,ptr,(size))
#define g_free(ptr) debug_free(__FILE__,__LINE__,__PRETTY_FUNCTION__,ptr)
#define g_strdup(ptr) debug_strdup(__FILE__,__LINE__,__PRETTY_FUNCTION__,ptr)
#define g_strdup_printf(fmt...) debug_guard(__FILE__,__LINE__,__PRETTY_FUNCTION__,g_strdup_printf(fmt))