]> git.sur5r.net Git - freertos/commitdiff
Change where the free heap space variable is initialised.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 6 Oct 2009 08:46:22 +0000 (08:46 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 6 Oct 2009 08:46:22 +0000 (08:46 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@910 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/MemMang/heap_2.c

index 1f81a08a5b3b7e2da937d7d2ae3871d7c14cb324..0cce436219a9eb179067150b7e61814b272e02a5 100644 (file)
@@ -95,7 +95,7 @@ static xBlockLink xStart, xEnd;
 \r
 /* Keeps track of the number of free bytes remaining, but says nothing about\r
 fragmentation. */\r
-static size_t xFreeBytesRemaining = configTOTAL_HEAP_SIZE;\r
+static size_t xFreeBytesRemaining;\r
 \r
 /* STATIC FUNCTIONS ARE DEFINED AS MACROS TO MINIMIZE THE FUNCTION CALL DEPTH. */\r
 \r
@@ -143,6 +143,8 @@ xBlockLink *pxFirstFreeBlock;                                                                                                               \
        pxFirstFreeBlock = ( void * ) xHeap.ucHeap;                                                                             \\r
        pxFirstFreeBlock->xBlockSize = configTOTAL_HEAP_SIZE;                                                   \\r
        pxFirstFreeBlock->pxNextFreeBlock = &xEnd;                                                                              \\r
+                                                                                                                                                                       \\r
+       xFreeBytesRemaining = configTOTAL_HEAP_SIZE;                                                                    \\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -267,3 +269,7 @@ size_t xPortGetFreeHeapSize( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+void vPortInitialiseBlocks( void )\r
+{\r
+       /* This just exists to keep the linker quiet. */\r
+}\r