* Sherlock Library -- Memory Pools (One-Time Allocation)
*
* (c) 1997--2001 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 "lib/pools.h"
#include <stdlib.h>
+#include <string.h>
struct memchunk {
struct memchunk *next;
return c->data;
}
}
+
+void *
+mp_alloc_zero(struct mempool *p, uns s)
+{
+ void *x = mp_alloc(p, s);
+ bzero(x, s);
+ return x;
+}