From: richardbarry Date: Tue, 20 Jul 2010 18:46:12 +0000 (+0000) Subject: Changed how the calculation of xFreeBytesRemaining is performed in the case where... X-Git-Tag: V6.1.0~98 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0c3f5e4249acd2524e2b5fc5f0684bd33cc0f76;p=freertos Changed how the calculation of xFreeBytesRemaining is performed in the case where a block of RAM is split before being returned to the callee. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1037 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/MemMang/heap_2.c b/Source/portable/MemMang/heap_2.c index 43440575c..b68b73a6e 100644 --- a/Source/portable/MemMang/heap_2.c +++ b/Source/portable/MemMang/heap_2.c @@ -221,7 +221,7 @@ void *pvReturn = NULL; prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); } - xFreeBytesRemaining -= xWantedSize; + xFreeBytesRemaining -= pxBlock->xBlockSize; } } }