ref: 64d062acdb9ed71cc251c69a08ee03e6c5bfcaaf 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; }