Change structs to unions to save a few bytes. Normally unions are against the coding standard but in this case they are permitted as their use is purely to ensure byte alignment.
diff --git a/Source/portable/MemMang/heap_1.c b/Source/portable/MemMang/heap_1.c index e9d1fe6..3b14e57 100644 --- a/Source/portable/MemMang/heap_1.c +++ b/Source/portable/MemMang/heap_1.c
@@ -98,7 +98,7 @@ /* Allocate the memory for the heap. The struct is used to force byte alignment without using any non-portable code. */ -static struct xRTOS_HEAP +static union xRTOS_HEAP { unsigned portLONG ulDummy; unsigned portCHAR ucHeap[ configTOTAL_HEAP_SIZE ];
diff --git a/Source/portable/MemMang/heap_2.c b/Source/portable/MemMang/heap_2.c index eef5bc0..87c1149 100644 --- a/Source/portable/MemMang/heap_2.c +++ b/Source/portable/MemMang/heap_2.c
@@ -86,7 +86,7 @@ /* Allocate the memory for the heap. The struct is used to force byte alignment without using any non-portable code. */ -static struct xRTOS_HEAP +static union xRTOS_HEAP { unsigned portLONG ulDummy; unsigned portCHAR ucHeap[ configTOTAL_HEAP_SIZE ];