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.

This commit is contained in:
Richard Barry 2009-05-30 13:25:16 +00:00
parent 3af07deca2
commit b57e4f4c36
2 changed files with 2 additions and 2 deletions

View file

@ -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 /* Allocate the memory for the heap. The struct is used to force byte
alignment without using any non-portable code. */ alignment without using any non-portable code. */
static struct xRTOS_HEAP static union xRTOS_HEAP
{ {
unsigned portLONG ulDummy; unsigned portLONG ulDummy;
unsigned portCHAR ucHeap[ configTOTAL_HEAP_SIZE ]; unsigned portCHAR ucHeap[ configTOTAL_HEAP_SIZE ];

View file

@ -86,7 +86,7 @@
/* Allocate the memory for the heap. The struct is used to force byte /* Allocate the memory for the heap. The struct is used to force byte
alignment without using any non-portable code. */ alignment without using any non-portable code. */
static struct xRTOS_HEAP static union xRTOS_HEAP
{ {
unsigned portLONG ulDummy; unsigned portLONG ulDummy;
unsigned portCHAR ucHeap[ configTOTAL_HEAP_SIZE ]; unsigned portCHAR ucHeap[ configTOTAL_HEAP_SIZE ];