diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-06-23 13:06:57 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-06-23 13:06:57 +0000 |
commit | a1d989b5eaf8edaa9f9f936e929e122b4f7bcf9c (patch) | |
tree | 49ce72e473ba9877d3c3b19f48affc49fe787aa6 /navit/debug.h | |
parent | d4ee807d411cec98cb08197c19da3018fb640a6e (diff) | |
download | navit-a1d989b5eaf8edaa9f9f936e929e122b4f7bcf9c.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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/navit/debug.h b/navit/debug.h index 6b41a7a77..7a041c9f8 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)) |