]> mj.ucw.cz Git - libucw.git/commitdiff
dmalloc and efence work again (ported from rel-2.1 branch).
authorMartin Mares <mj@ucw.cz>
Sat, 22 Jun 2002 16:42:45 +0000 (16:42 +0000)
committerMartin Mares <mj@ucw.cz>
Sat, 22 Jun 2002 16:42:45 +0000 (16:42 +0000)
lib/alloc.c
lib/lib.h
lib/realloc.c

index 075321436c44f1dba1ffb54d5098d5248fd60b64..bab72329a6fe13fa9db505261e2f9bdd16936f8d 100644 (file)
@@ -9,6 +9,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#ifndef DMALLOC
+
 void *
 xmalloc(uns size)
 {
@@ -18,6 +20,8 @@ xmalloc(uns size)
   return x;
 }
 
+#endif
+
 void *
 xmalloc_zero(uns size)
 {
index 7c3eb5ff472f367bb8efc82a1dad862f07148db6..e2bc3ef434cf34a166175ba2e085eeab6393b160 100644 (file)
--- 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 */
index 6829c71fb46b8588832c86bb75a45695bf3df6b4..817f035c92175b1a403d703cde1a72811c78c6f3 100644 (file)
@@ -8,6 +8,8 @@
 
 #include <stdlib.h>
 
+#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