/*
- * Sherlock Library -- Memory Allocation
+ * UCW Library -- Memory Allocation
*
* (c) 2000 Martin Mares <mj@ucw.cz>
+ *
+ * This software may be freely distributed and used according to the terms
+ * of the GNU Lesser General Public License.
*/
#include "lib/lib.h"
#include <stdlib.h>
#include <string.h>
-#ifndef DMALLOC
+#ifndef DEBUG_DMALLOC
void *
xmalloc(uns size)
bzero(x, size);
return x;
}
+
+void
+xfree(void *ptr)
+{
+ /*
+ * Maybe it is a little waste of resources to make this a function instead
+ * of a macro, but xmalloc() is not used for anything critical anyway,
+ * so let's prefer simplicity.
+ */
+ free(ptr);
+}