ref: 151d1d7500734dc63d8eea6dccdb246438725329 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++; } }