Memory management project, malloc heap implementation
Usage:
Include the library first with: #include "mmalloc.h"
After previously mentioned action, you can call following functions respectively:
InitMmalloc();
void *buffer = Mmalloc(size_t size);
MFree(buffer);
PrintMmallocFreeList();
todo:
- finish mmalloc, free, print_heap, memadd
- pass all tests: +test1, +test2, +test3, +test4
- implement mcalloc(n, size)
- implement error-checking
- implement bfree(p, n)
- implement garbage-collection
- find a way to implement several algorithms and types of heap management and a way to choose/switch between them
couple of ideas:
mmalloc_bf //best fit or mmalloc_ff //first fit...
mmalloc(n, algorithm)
#define MMALLOC_BEST_FIT
#include "mmalloc_bf_ilt.h" //mmalloc | best-fit algorithm | implicit-list-type structure - implement jemalloc, ptmalloc, dlmalloc...