Ooyala Interview Question

Write an algorithm for malloc and free.