heap_allocator
heap_allocator copied to clipboard
A simple heap memory allocator in ~200 lines.
There is a small typo in commented_heap.c. Should read `necessary` rather than `neccesary`. Semi-automated pull request generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md
On line 71 in heap.c of current version, when the node being freed is the start of the heap, we still need to check whether it can be merged with...
Fix not used error. This happens when it compiles with `-Werror=unused-variable`. ex) `gcc -O3 llist.c heap.c main.c -o heap_test -Werror=unused-variable`
1. Allocate memory with alignment in case of the crash in some embedded system; 2. Free memory without coalesce the next node(or previous node) when the current node is the...
Hi: Nice job! Got a bit question though. What’s the point of returning &found->next to user in malloc? The whole chunk size is still “sizeof(node_t) + size + sizeof(footer)”, which...