Pregunta de entrevista de Virtu Financial

Design a custom memory allocator supporting malloc/free, explain fragmentation, coalescing, alignment handling, slab allocation behavior, and discuss mmap vs malloc internals, lock-free concepts, and low-level Linux memory management.

Respuesta de la entrevista

Anónimo

17 may 2026

I explained a basic allocator design using block headers, free lists, splitting/coalescing, alignment handling, and discussed fragmentation scenarios with contiguous memory constraints. I also explained mmap vs malloc behavior, eBPF/perf concepts, and lock-free synchronization approaches. However, the interviewer continuously interrupted explanations with extremely deep recursive follow-up questions, leaving very little time for the actual coding portion.