This project is about implementing a dynamic memory allocation mechanism
The first implementation was created accordingly to stepik guide.
Works on 🐧 Linux and 🍏 MacOS
Clone: $ git clone --recursive https://github.com/olehsamoilenko/malloc.git
Compile: $ make
Compile debug version: $ make debug
Again usual version: $ make re
To run tests please use: $ ./run.sh ./test
To show malloc performance please use:
$ ./run.sh /usr/bin/time -l ./test
on 🍏 MacOS or
$ ./run.sh /usr/bin/time --verbose ./test
on 🐧 Linux
$ gcc program.c [-lft_malloc -L .]
$ ./run.sh ./a.out
- memory defragmentation
- unmap-ing unused pages
- memory hexdump with
show_alloc_mem_ex()
- debug enviroment variable
DEBUG
- test framework:
$ make debug && sh tests/run_tests.sh
- integrated with ls:
$ ./run.sh 'ls -lRa /'
(sorry, only for 🍏 MacOS) - nm cleared of redundant functions