shithub: drawterm

ref: 6c4be825d2f7c5f2c1a8c01f97b0c4cbec6b8aa3
dir: /libc/mallocz.c/

View raw version
#include <u.h>
#include <libc.h>

void*
mallocz(ulong n, int clr)
{
	void *v;

	v = malloc(n);
	if(v && clr)
		memset(v, 0, n);
	return v;
}