ref: 3a41ce3bf314caad67c2c52a06142f7ac60611c7 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; }