ref: e8f5e0909f4a7c7ae2c4e85f563e6b4da88aa98f dir: /sys/src/cmd/unix/drawterm/libc/mallocz.c/
#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; }