ref: c9e1f4003a54d71ed97e6d7d32487c616be893c0 dir: /libc/free.c/
#include <u.h> #include <mem.h> void free(void *mem) { int i; i = (((int)(mem) - MEM_BEG ) / BLOCKSIZE)+1; while(memap[i]) { memap[i] = 0; *(char*)mem++ = '\0'; i++; } }