ref: a898d31f76b7424aeb65b07350cec3539620d50e dir: /sys/src/libc/port/memset.c/
#include <u.h> #include <libc.h> void* memset(void *ap, int c, ulong n) { char *p; p = ap; while(n > 0) { *p++ = c; n--; } return ap; }