From 08c8e738a3c1016d11780b84153b7ee4f2b680ab Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Sat, 19 Jul 2008 14:01:40 +0200 Subject: [PATCH] Libucw: remove dmalloc support --- ucw/alloc.c | 4 ---- ucw/autoconf.cfg | 2 -- ucw/lib.h | 13 ------------- ucw/realloc.c | 4 ---- 4 files changed, 23 deletions(-) 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 -- 2.39.2