From 3c3228083a1ac495d5fcbd3b7e0e168d9da75080 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sat, 30 May 2009 13:25:16 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@751 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/MemMang/heap_1.c | 2 +- Source/portable/MemMang/heap_2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/portable/MemMang/heap_1.c b/Source/portable/MemMang/heap_1.c index e9d1fe634..3b14e5773 100644 --- a/Source/portable/MemMang/heap_1.c +++ b/Source/portable/MemMang/heap_1.c @@ -98,7 +98,7 @@ Changes between V2.6.1 and V3.0.0 /* 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 eef5bc071..87c114990 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 ]; -- 2.39.2