The functions in the memlib.c file for managing the heap:
You should not change anything in these functions.