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