part 2 of FORCE_ALIGNMENT fix for arduino targets.

When FORCE_ALIGNMENT was introduced for pointer aligment on 8-bit arduino targets (See idris-lang@47cd264) it was not applied to the initialization of the cheney algorithm during garbage collection. The fix modifies the start of the heap location in the same way the FORCE_ALIGNMENT-define does for the initialization of the FP-heap in alloc_heap(...) in file idris_heap.c.

To prevent duplicate code this logic has been put in the function aligned_heap_pointer(...).
This commit is contained in:
XeFias 2017-01-09 21:41:58 +01:00 committed by GitHub
parent 376db080f2
commit d2a81f50a9

View File

@ -98,7 +98,7 @@ typedef struct {
void alloc_heap(Heap * heap, size_t heap_size, size_t growth, char * old);
void free_heap(Heap * heap);
char* aligned_heap_pointer(char * heap);
#ifdef IDRIS_DEBUG
void heap_check_all(Heap * heap);