Pergunta de entrevista da empresa Cisco

How would you implement malloc()?