Skip to content

Instantly share code, notes, and snippets.

@DmitrySoshnikov
DmitrySoshnikov / malloc.cpp
Created May 17, 2017 18:59
Educational memory allocator
/**
* Simple and educational `malloc` implementation.
*
* Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
*
* Maintains explicit linked list of allocated memory blocks. Each block
* has a header, containing meta-information, such as whether a block is
* free, its size, and a reference to the next block.
*
* Homework assignments: