Creating a custom memory allocator with C using the sbrk
syscall.
void *sadloc(size_t size);
void sadfree(void *block);
void *sadcloc(size_t nmemb, size_t size);
void *sadreloc(void *ptr, size_t size);
- sadloc (malloc)
- sadfree (free)
- sadcloc (calloc)
- sadreloc (realloc)
$ make <function>_test
$ make sadloc_test