From: richardbarry Date: Tue, 6 Oct 2009 08:46:22 +0000 (+0000) Subject: Change where the free heap space variable is initialised. X-Git-Tag: V6.0.0~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ac8282ac7e592bf4f6293b9e929626a4258ba7ac;p=freertos Change where the free heap space variable is initialised. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@910 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/MemMang/heap_2.c b/Source/portable/MemMang/heap_2.c index 1f81a08a5..0cce43621 100644 --- a/Source/portable/MemMang/heap_2.c +++ b/Source/portable/MemMang/heap_2.c @@ -95,7 +95,7 @@ static xBlockLink xStart, xEnd; /* Keeps track of the number of free bytes remaining, but says nothing about fragmentation. */ -static size_t xFreeBytesRemaining = configTOTAL_HEAP_SIZE; +static size_t xFreeBytesRemaining; /* STATIC FUNCTIONS ARE DEFINED AS MACROS TO MINIMIZE THE FUNCTION CALL DEPTH. */ @@ -143,6 +143,8 @@ xBlockLink *pxFirstFreeBlock; \ pxFirstFreeBlock = ( void * ) xHeap.ucHeap; \ pxFirstFreeBlock->xBlockSize = configTOTAL_HEAP_SIZE; \ pxFirstFreeBlock->pxNextFreeBlock = &xEnd; \ + \ + xFreeBytesRemaining = configTOTAL_HEAP_SIZE; \ } /*-----------------------------------------------------------*/ @@ -267,3 +269,7 @@ size_t xPortGetFreeHeapSize( void ) } /*-----------------------------------------------------------*/ +void vPortInitialiseBlocks( void ) +{ + /* This just exists to keep the linker quiet. */ +}