← projects

systems · sub-star

custom_mem_alloc

thread-safe memory allocator talking straight to the OS via mmap.



readme

A replacement for malloc written in C that interfaces directly with the operating system. It requests one large contiguous region of virtual memory up front through mmap, then slices that region for the program itself with minimal overhead, managing its own free list, aligning every allocation, and staying safe under threads.

artifact

simulated heap: mallocs claim blocks, frees release them, the pool gets recycled.

signal log

built with

Cpthreads

open the live demo →
view repository →