FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2015 Threads]
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 xBlockLink *
pxIterator->pxNextFreeBlock ==> 0x200157d8 struct ABLOCKLINK *
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
Things to check include:
1) That the same block is not being freed twice. Recent versions of FreeRTOS will trigger a configASSERT() if the same block is freed twice, but I'm not sure if V7.30 (which is a bit old now) has this assert check or not. Do you have configASSERT() defined?
2) Nothing is corrupting the memory immediately in front block being freed, which contains some meta data.
Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.