shithub: riscv

ref: 74dfb591e159b5d4600e34dc736a611b2f4a11ba
dir: /sys/src/ape/lib/ap/plan9/9mallocz.c/

View raw version
#include <stdlib.h>
#include <string.h>

void*
_MALLOCZ(int n, int clr)
{
	void *v;

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