1
0
mirror of https://github.com/ioacademy-jikim/debugging synced 2025-06-22 07:16:17 +00:00
2015-12-13 22:34:58 +09:00

22 lines
255 B
C

#include <stdio.h>
static char buf[10000];
static int bufi = 0;
void* malloc(size_t i) {
bufi += i;
return buf + bufi - i;
}
void free(void*ptr) {
}
int main (void)
{
char *p;
p = malloc(10);
p = malloc(123);
free(p);
return 0;
}