Walmart interview question

How does malloc work?