“A custom memory management strategy implemented in C to ensure zero-leak stability under high-stakes testing constraints.”
This project is a custom memory allocator implemented using a double linked list data structure. The allocator was developed as a learning exercise to better understand how the standard malloc library works. By creating my own version of the memory allocation functionality, I was able to experiment with different strategies, test the allocator’s performance across various programs and gain deeper understanding of the underlying mechanisms involved.
The allocator can be used as a drop-in replacement for the standard malloc library by linking against the libmalloc.so shared library (run make library to compile). A comprehensive test suite has been developed to validate the allocator’s functionality across a wide range of scenarios.
To run the test suite, run make check. The output will display the results of the various tests, including any failures or issues encountered.
It can be used to run smoothly Chromium for example, or some CLI program such as ls, git status, tree, ip a, …
This library can be compiled using itself, to do so: run make library then LD_PRELOAD=./libmalloc.so make library.