xref: /plan9-contrib/sys/src/ape/lib/ap/plan9/9mallocz.c (revision 40ef9009116dd37656783aaadc8782c1d8bfb056)
1 #include <stdlib.h>
2 #include <string.h>
3 
4 void*
_MALLOCZ(int n,int clr)5 _MALLOCZ(int n, int clr)
6 {
7 	void *v;
8 
9 	v = malloc(n);
10 	if(v && clr)
11 		memset(v, 0, n);
12 	return v;
13 }
14 
15