Bloomberg Interview Question

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