From: Michal Vaner Date: Sat, 19 Jul 2008 12:01:40 +0000 (+0200) Subject: Libucw: remove dmalloc support X-Git-Tag: holmes-import~386 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=08c8e738a3c1016d11780b84153b7ee4f2b680ab;p=libucw.git Libucw: remove dmalloc support --- diff --git a/ucw/alloc.c b/ucw/alloc.c index bed8c51f..4f531366 100644 --- a/ucw/alloc.c +++ b/ucw/alloc.c @@ -12,8 +12,6 @@ #include #include -#ifndef DEBUG_DMALLOC - void * xmalloc(uns size) { @@ -23,8 +21,6 @@ xmalloc(uns size) return x; } -#endif - void * xmalloc_zero(uns size) { diff --git a/ucw/autoconf.cfg b/ucw/autoconf.cfg index 83743a57..8d295d7a 100644 --- a/ucw/autoconf.cfg +++ b/ucw/autoconf.cfg @@ -299,8 +299,6 @@ if (Get("CPU_ARCH") eq "default" || Get("CPU_ARCH") =~ /^i[345]86$/) { # If debugging memory allocations: #LIBS+=-lefence -#CDEBUG+=-DDEBUG_DMALLOC -#LIBS+=-ldmalloc # Remember PKG_CONFIG_PATH used for building, so that it will be propagated to # pkg-config's run locally in the makefiles. diff --git a/ucw/lib.h b/ucw/lib.h index 624da3ca..904cadee 100644 --- a/ucw/lib.h +++ b/ucw/lib.h @@ -136,18 +136,6 @@ void assert_failed_noinfo(void) NONRET; #define xrealloc sh_xrealloc #define xfree sh_xfree -#ifdef DEBUG_DMALLOC -/* - * The standard dmalloc macros tend to produce lots of namespace - * conflicts and we use only xmalloc and xfree, so we can define - * the stubs ourselves. - */ -#define DMALLOC_DISABLE -#include -#define sh_xmalloc(size) _xmalloc_leap(__FILE__, __LINE__, size) -#define sh_xrealloc(ptr,size) _xrealloc_leap(__FILE__, __LINE__, ptr, size) -#define sh_xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr) -#else /* * Unfortunately, several libraries we might want to link to define * their own xmalloc and we don't want to interfere with them, hence @@ -156,7 +144,6 @@ void assert_failed_noinfo(void) NONRET; void *xmalloc(uns) LIKE_MALLOC; void *xrealloc(void *, uns); void xfree(void *); -#endif void *xmalloc_zero(uns) LIKE_MALLOC; char *xstrdup(const char *) LIKE_MALLOC; diff --git a/ucw/realloc.c b/ucw/realloc.c index ed3f1a43..51b50dec 100644 --- a/ucw/realloc.c +++ b/ucw/realloc.c @@ -11,8 +11,6 @@ #include -#ifndef DEBUG_DMALLOC - void * xrealloc(void *old, uns size) { @@ -22,5 +20,3 @@ xrealloc(void *old, uns size) die("Cannot reallocate %d bytes of memory", size); return x; } - -#endif