About this question
Medium · low_latency · Quant Developer interview question · hugepage, prefault, mmap, low_latency, memory, tlb
High-frequency trading (HFT) systems require deterministic, low-latency memory access. Operating systems use demand paging, where memory pages are allocated on first access, causing a performance-killing page fault. To prevent this during live trading, critical memory buffers are "warmed up" by pre-faulting each page at startup. Task Implement the function warmup_pages(long size_bytes) to simulate memory page pre-faulting. The function should allocate a buffer of size_bytes, sequentially touch
Keep practicing