From e0c3f5e4249acd2524e2b5fc5f0684bd33cc0f76 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Tue, 20 Jul 2010 18:46:12 +0000 Subject: [PATCH] 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 --- Source/portable/MemMang/heap_2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } } -- 2.39.5