AlgoInsight

System design interview question

Design Memory Allocator (malloc/free)

HardDeveloper Tools & InfrastructureLLD practice

A heap allocator: explicit free list, first-fit / best-fit / worst-fit placement strategies, coalescing of adjacent free blocks on free, segregated free lists by size class to bound search cost, alignment to a power-of-two boundary, and a discussion of internal vs external fragmentation. Implemented in TypeScript, Java, and C++.

Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.

memoryallocatorfree-listfragmentationlow-level

Practice this question