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