1 #include <stdio.h> 2 3 static char buf[10000]; 4 static int bufi = 0; malloc(size_t i)5void* malloc(size_t i) { 6 bufi += i; 7 return buf + bufi - i; 8 } 9 free(void * ptr)10void free(void*ptr) { 11 } 12 main(void)13int main (void) 14 { 15 char *p; 16 p = malloc(10); 17 p = malloc(123); 18 free(p); 19 return 0; 20 } 21 22