plan9port/src/lib9/mallocz.c
rsc 8ad517944e Today's changes.
More changes.
2004-03-25 23:03:57 +00:00

15 lines
189 B
C

#include <u.h>
#include <unistd.h>
#include <string.h>
#include <libc.h>
void*
mallocz(unsigned long n, int clr)
{
void *v;
v = malloc(n);
if(clr && v)
memset(v, 0, n);
return v;
}