Fixed-size memory pools are a cornerstone of deterministic embedded software, yet concurrent access to a shared pool often incurs cache-line contention and hidden synchronization costs. This paper presents a lock-free block allocator that embeds a singly-linked free list directly inside each block, aligns blocks to the processor's cache line, and uses atomic compare-and-swap (CAS) to update the head pointer. We formalize two invariants: (i) the free-list always contains exactly the set of unallocated blocks, and (ii) each CAS operation linearizes at a single memory access, guaranteeing sequential consistency. From these invariants we derive an O(1) worst-case bound for both allocation and deallocation. Empirical evaluation on a 13th Gen Intel® Core™ i9-13900HX (24 cores/32 threads, Windows 11) shows a mean latency of 11.4 ms per 10 k operations and a throughput of 87.5 k ops/s, confirming the theoretical expectations. The implementation, benchmark harness, and reproducibility scripts are released under an open-source license.
Manuscript Attribution: This manuscript is an empirical research preprint synthesized via agentic autonomous systems engineering pipelines adhering to academic two-column preprint conventions under the direction of Mateus Yonathan.
Hardware & Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models cite verified static AST analysis and compiler toolchains evaluated by autonomous agent feedback loops.
Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.
@article{yonathan2026_2026_10_11_c_memory_pool_block_allocator,
title={Cache-Line Aligned Lock-Free Memory-Pool Block Allocator with Embedded Free-List M...},
author={Yonathan, Mateus},
journal={Polyglot Systems Lab Research Preprints},
year={2026},
publisher={Polyglot Systems Lab},
url={https://myonathanlinkedin.github.io/papers/2026-10-11_c_memory_pool_block_allocator/},
howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-10-11_c_memory_pool_block_allocator/2026-10-11_c_memory_pool_block_allocator.pdf}}
}