ralloc
WIPMemory allocator in Rust that runs as the global allocator
Why
Writing an allocator to understand what malloc does. It started as a bump allocator.
How it works
Boundary tag headers and footers inline in the heap, a doubly linked free list, first fit with splitting, and coalescing with both neighbours on free. Any power of two alignment works. It implements GlobalAlloc behind a spinlock, and the tests run Vec, String, HashMap and threads on it. A heap checker runs after every step of a randomised test, and everything runs under Miri, which found a real aliasing bug in dealloc.
Next
Next is getting memory from mmap so the heap can grow, size classes for small allocations, and a benchmark against the system allocator.