Merge pull request #5 from dgarske/fix_realloc
commit
115cd3acf5
|
@ -318,7 +318,7 @@ void *pvReturn = NULL;
|
||||||
if(pxLink->xBlockSize & xBlockAllocatedBit)
|
if(pxLink->xBlockSize & xBlockAllocatedBit)
|
||||||
{
|
{
|
||||||
uint32_t blockSize = (pxLink->xBlockSize & ~xBlockAllocatedBit);
|
uint32_t blockSize = (pxLink->xBlockSize & ~xBlockAllocatedBit);
|
||||||
blockSize -= (xHeapStructSize + HEAP_CHECK_SIZE);
|
blockSize -= xHeapStructSize;
|
||||||
pvReturn = pvPortMalloc(xWantedSize);
|
pvReturn = pvPortMalloc(xWantedSize);
|
||||||
if(pvReturn)
|
if(pvReturn)
|
||||||
{
|
{
|
||||||
|
|
|
@ -327,7 +327,7 @@ void *pvReturn = NULL;
|
||||||
if(pxLink->xBlockSize & xBlockAllocatedBit)
|
if(pxLink->xBlockSize & xBlockAllocatedBit)
|
||||||
{
|
{
|
||||||
uint32_t blockSize = (pxLink->xBlockSize & ~xBlockAllocatedBit);
|
uint32_t blockSize = (pxLink->xBlockSize & ~xBlockAllocatedBit);
|
||||||
blockSize -= (uxHeapStructSize + HEAP_CHECK_SIZE);
|
blockSize -= uxHeapStructSize;
|
||||||
pvReturn = pvPortMalloc(xWantedSize);
|
pvReturn = pvPortMalloc(xWantedSize);
|
||||||
if(pvReturn)
|
if(pvReturn)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue