Domanda di colloquio di Bloomberg

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