code: drawterm

ref: 7d7ddbc142a30bdaf746b4d106b6a9b3e2c74982
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;
}