memalloc
memalloc copied to clipboard
Update memalloc.c
The previous implementation releases only the last element. The new implementation releases all free elements that are trailing.
Test 1 =>
- make allocations
- remove them FiLo (inverted order of creation)
- the entire heap is returned to system
Test 2 =>
- make allocations
- remove them FiFo (order of creation)
- only the size of the last removed element is returned to system
- with the changes the entire heap is returned to system