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(...).
commitd2a81f50a922971ee87dcbf7cc3e4d40f9c9dfda
authorXeFias <xefias@gmail.com>
dateMon 9 Jan 2017, 21:41 (10 years ago)
parent376db08
rts/idris_heap.h+1−1
@@ -98,7 +98,7 @@ typedef struct {
9898
9999void alloc_heap(Heap * heap, size_t heap_size, size_t growth, char * old);
100100void free_heap(Heap * heap);
101−
101+char* aligned_heap_pointer(char * heap);
102102
103103#ifdef IDRIS_DEBUG
104104void heap_check_all(Heap * heap);