Sierraware interview question

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