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