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] [September 2005 Threads] Infinite loopPosted by Nobody/Anonymous on September 14, 2005 pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock ) ) { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; }
Richard,
I'm still having this looping problem within heap2 in the above code. It does appear to occur randomly. I've tried everything to understand this, except for beating my head against a wall :-)
If I step through the above code, the value of pxBlock is always the same. IE the linked list seems to be linked to the same cell.
My guess is that there is a critical area somewhere which is not protected and an interrupt has sneaked it... Any ideas.
Thanks Phil
RE: Infinite loopPosted by Richard on September 14, 2005 ThatÂ’s interesting. I will have to run through the test code to re-familiarise myself with this function to see if I can work out how this could happen.
Before you enter the loop pxBlock is set to the address of xStart. Is this still the case when you start looping forever, or does the loop execute correctly for a bit before getting stuck. Alternatively, If you are able to inspect xStart from within your debugger, then does xStart.pxNextFreeBlock point back to xStart?
RE: Infinite loopPosted by Nobody/Anonymous on September 14, 2005 Will check and see.
Phil
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|