Cisco Interview Question

How would you implement malloc()?