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] infinate loop on mallocPosted by Phil on September 13, 2005 I have an app which deletes and creates tasks.
It appears that I have an infinate loop on the following code in PortMalloc:
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock ) ) { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; }
This is where it is looking for, I guess a 'first fit' block. Any ideas? Has something gotten corrupted?
RE: infinate loop on mallocPosted by Richard on September 13, 2005 I think you are right, something in the data structures must have got corrupted. Should not ever get stuck there.
Presumably from the sample heap_2.c. Note that this does not join adjacent blocks together so it can get fragmented. If the only things being allocated at run time are tasks, and each task has the same size stack, then this should not be a problem as the block size being allocated each time will be the same.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|