From: Martin Mares Date: Sat, 22 Jun 2002 16:42:45 +0000 (+0000) Subject: dmalloc and efence work again (ported from rel-2.1 branch). X-Git-Tag: holmes-import~1394 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=34289767d57bb8845699c819362d286bd51c8952;p=libucw.git dmalloc and efence work again (ported from rel-2.1 branch). --- diff --git a/lib/alloc.c b/lib/alloc.c index 07532143..bab72329 100644 --- a/lib/alloc.c +++ b/lib/alloc.c @@ -9,6 +9,8 @@ #include #include +#ifndef DMALLOC + void * xmalloc(uns size) { @@ -18,6 +20,8 @@ xmalloc(uns size) return x; } +#endif + void * xmalloc_zero(uns size) { diff --git a/lib/lib.h b/lib/lib.h index 7c3eb5ff..e2bc3ef4 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -84,11 +84,11 @@ void log_fork(void); */ #define xmalloc sh_xmalloc void *xmalloc(unsigned); -void *xmalloc_zero(unsigned); void *xrealloc(void *, unsigned); #define xfree(x) free(x) #endif +void *xmalloc_zero(unsigned); byte *stralloc(byte *); /* Objects */ diff --git a/lib/realloc.c b/lib/realloc.c index 6829c71f..817f035c 100644 --- a/lib/realloc.c +++ b/lib/realloc.c @@ -8,6 +8,8 @@ #include +#ifndef DMALLOC + void * xrealloc(void *old, uns size) { @@ -16,3 +18,5 @@ xrealloc(void *old, uns size) die("Cannot reallocate %d bytes of memory", size); return x; } + +#endif