Skip to content

This project is about implementing a dynamic memory allocation mechanism 💾

Notifications You must be signed in to change notification settings

olehsamoilenko/malloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

malloc

This project is about implementing a dynamic memory allocation mechanism
The first implementation was created accordingly to stepik guide.
Works on 🐧 Linux and 🍏 MacOS

Compile library

Clone: $ git clone --recursive https://github.com/olehsamoilenko/malloc.git
Compile: $ make
Compile debug version: $ make debug
Again usual version: $ make re

Run tests

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

Use library

$ gcc program.c [-lft_malloc -L .]
$ ./run.sh ./a.out

Features

  • 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

About

This project is about implementing a dynamic memory allocation mechanism 💾

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published