/*
* Sherlock Library -- Memory Allocation
*
- * (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ * (c) 2000 Martin Mares <mj@ucw.cz>
*/
-#include <stdio.h>
-#include <stdlib.h>
-
#include "lib/lib.h"
+#include <stdlib.h>
+#include <string.h>
+
void *
xmalloc(uns size)
{
die("Cannot allocate %d bytes of memory", size);
return x;
}
+
+void *
+xmalloc_zero(uns size)
+{
+ void *x = xmalloc(size);
+ bzero(x, size);
+ return x;
+}