]> git.sur5r.net Git - freertos/blobdiff - Source/portable/MemMang/heap_1.c
Add proper 8 byte alignment support.
[freertos] / Source / portable / MemMang / heap_1.c
index 126609b3fd83b50108e8fb4a5cc0ae491411da4b..7dff39e50a0c620db765852867bc713e71b73184 100644 (file)
        licensing and training services.\r
 */\r
 \r
-/* \r
-\r
-Changes between V2.5.1 and V2.5.1\r
-\r
-       + The memory pool has been defined within a struct to ensure correct memory\r
-         alignment on 32bit systems.\r
-\r
-Changes between V2.6.1 and V3.0.0\r
-\r
-       + An overflow check has been added to ensure the next free byte variable \r
-         does not wrap around.\r
-*/\r
-\r
 \r
 /*\r
  * The simplest possible implementation of pvPortMalloc().  Note that this\r
@@ -100,7 +87,11 @@ Changes between V2.6.1 and V3.0.0
 alignment without using any non-portable code. */\r
 static union xRTOS_HEAP\r
 {\r
-       volatile unsigned portLONG ulDummy;\r
+       #if portBYTE_ALIGNMENT == 8\r
+               volatile portDOUBLE dDummy;\r
+       #else\r
+               volatile unsigned portLONG ulDummy;\r
+       #endif  \r
        unsigned portCHAR ucHeap[ configTOTAL_HEAP_SIZE ];\r
 } xHeap;\r
 \r