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] [October 2005 Threads] Limit To # of Tasks RunningPosted by Nobody/Anonymous on October 21, 2005 Are the number of tasks basically limited to the amount of available memory?
Any plans for a memory manager that can realloc stale memory?
Thanks.
RE: Limit To # of Tasks RunningPosted by Richard on October 21, 2005 The memory schemes provided are just examples as different applications have very different requirements (as per the text on the memory management documentation page).
The heap2 scheme will reuse memory, but it will not consolidate fragmented blocks into single large blocks. To do so would increase the code size and execution time, and make the execution time more non deterministic. This is ok of coarse for some application but definitely not for others.
Heap2 can be used if the memory being allocated and freed is always of the same size as then fragmentation should not occur. The death sample files that create and delete tasks use heap2 as the stack of the tasks is always the same size.
Regards.
RE: Limit To # of Tasks RunningPosted by Richard on October 21, 2005 Forgot to actually answer the question - yes the number of tasks is only limited by the amount of RAM.
Regards.
RE: Limit To # of Tasks RunningPosted by Colin Tan on February 16, 2009 Hi Richard,
I have a little problem with the maximum number of tasks perhaps you could shed some light.
I am developing on both the LPC2109 and LPC2104. To test out the tasks I have the flash task flash multiple LEDs. So far for both boards I can only manage to create 3 tasks before the board refuses to respond. I can increase the number of tasks however by reducing the minimum stack size.
What could be limiting the number of tasks? If it is the RAM why is it the LPC2104 is also limited to 3 ?
Thanks Colin
RE: Limit To # of Tasks RunningPosted by Dave on February 16, 2009 It depends on which heap implementation you are using.
Each time you create a task the stack for the task is allocated. When you run out of RAM the stack cannot be allocated and the task cannot be created.
To be able to create more tasks reduce the stack size so less is allocated each time or increase the amount of RAM available. This is normally done by increasing configTOTAL_HEAP_SIZE in FreeRTOSConfig.h but this depends on the heap you are using. See http://www.freertos.org/a00111.html for more information.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|