Qualcomm interview question

Describe in detail how a memory allocator works (malloc).