Bloomberg interview question

How would you go about implementing malloc() and free()?