gabor90 wrote on Wednesday, July 08, 2015:
Hi!
I have some problems using this code:
In the prvInsertBlockIntoFreeList() 's
for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock )
{
/* Nothing to do here, just iterate to the right position. */
}
this turn into infinite loop,
and
pvPortMalloc() 's
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
{
pxPreviousBlock = pxBlock;
pxBlock = pxBlock->pxNextFreeBlock;
}
It has the same issue.
For example, in prvInsertBlockIntoFreeList():
pxIterator 's value ==> 0x200157d8 <xHeap+84464> xBlockLink *
pxIterator->pxNextFreeBlock ==> 0x200157d8 <xHeap+84464> struct A_BLOCK_LINK *
I found some similar topic in this forum, but they cannot help me:
- is declaration corrupt? Why and what data could be corrupt?
- overwrited data? how can i find that?
The classes, which i use, call pvPortMalloc() and vPortFree() functions are working fine.
I tried to increase the totalHeap, but it didn’t help me.
I use FreeRTOS V7.3.0
and heap_4.c.
Thank you for all help,
Best regards
Gábor