From 8f6e5062d48756c5efd1796276eb367645e458d9 Mon Sep 17 00:00:00 2001 From: Richard Barry 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. --- 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; } } }