Sierraware Interview Question

write an algorithm to implement malloc() and free()