Your dynamic storage allocator will consist of the following four
functions, which are declared in mm.h and defined in
mm.c.
int mm_init(void);
void *mm_malloc(size_t size);
void mm_free(void *ptr);
void *mm_realloc(void *ptr, size_t size);
The mm.c file we have given you implements the simplest but
still functionally correct malloc package that we could think
of. Using this as a starting place, modify these functions (and
possibly define other private static functions), so that they
obey the following semantics:
These semantics match the the semantics of the corresponding
Linux malloc(), realloc(), and free() routines. Type man malloc
at the shell for complete documentation.