-/* $Id: util.c,v 1.5 1996/04/15 03:57:04 wessels Exp $ */
+/* $Id: util.c,v 1.6 1996/04/15 04:23:42 wessels Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include "autoconf.h"
-#define XMALLOC_DEBUG
-#ifdef XMALLOC_DEBUG
+#if XMALLOC_DEBUG
#define DBG_ARRY_SZ (2<<8)
#define DBG_ARRY_BKTS (2<<8)
static void *malloc_ptrs[DBG_ARRY_BKTS][DBG_ARRY_SZ];
}
exit(1);
}
-#ifdef XMALLOC_DEBUG
+#if XMALLOC_DEBUG
check_malloc(p, sz);
#endif
return (p);
void xfree(s)
void *s;
{
-#ifdef XMALLOC_DEBUG
+#if XMALLOC_DEBUG
check_free(s);
#endif
if (s != NULL)
void xxfree(s)
void *s;
{
-#ifdef XMALLOC_DEBUG
+#if XMALLOC_DEBUG
check_free(s);
#endif
free(s);
}
exit(1);
}
-#ifdef XMALLOC_DEBUG
+#if XMALLOC_DEBUG
check_malloc(p, sz);
#endif
return (p);
}
exit(1);
}
-#ifdef XMALLOC_DEBUG
+#if XMALLOC_DEBUG
check_malloc(p, sz * n);
#endif
return (p);