A custom-designed Heap Memory Manager built from scratch in C for Linux environments.
This project re-implements and enhances core memory allocation functionalities such as calloc() and free() — with internal & external fragmentation prevention, block coalescing, and visualization of the heap state.---
- Custom heap allocator built entirely from scratch (no system
malloc). - Implements
XMALLOC()(likecalloc) andXFREE()(likefree). - Prevents internal and external fragmentation using block splitting & merging.
- Includes utilities to inspect and visualize memory blocks in use.
- Modular structure with separate Memory Manager and Glue Thread modules.
- Fully tested using
testapp.c.
gcc -Iinclude -Iglthread -g -c src/testapp.c -o build/testapp.o
gcc -Iinclude -Iglthread -g -c src/mm.c -o build/mm.o
gcc -Iinclude -Iglthread -g -c glthread/glthread.c -o build/glthread.o
gcc -Iinclude -Iglthread -g build/testapp.o build/mm.o build/glthread.o -o build/test.exe
Then run: ./build/test.exe