Skip to content
Snippets Groups Projects
Commit be9e0e49 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'clean_up_allocations' into 'master'

Clean up allocations and deallocations

Two improvements to the code:

 - Replaced all calls to `alloca()` by `malloc()` and `posix_memalign()` depending on use case.
 - Added cleaning up code to free up all the allocated memory. 

The second change is there to make sure we don't have memory leaks by easing the read of the memory sanitizer output. There is only one allocation that cannot be easily freed at the end of a run. In space.c (line 1327) we allocate cells in batches and then use them as a linked list. No memory leak there, just a hard unnecessary work to clean up at the end of a run.

That allows to run the EAGLE_50 example for hundreds of steps. 

See merge request !211
parents e29af86f e8b8139c
No related branches found
No related tags found
1 merge request!211Clean up allocations and deallocations
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment