rtel wrote on Monday, April 16, 2012:
Is there any possibility, of the addition of all individual task stacks exceeding the amount of total heap allocation?
Naturally, yes, there is a limited amount of RAM and a user can attempt to create an infinite amount of tasks.
heap_1.c and heap_2.c both have a function xPortGetFreeHeapSize() that allows you to query the stack remaining. heap_3.c uses malloc() and free() so FreeRTOS itself cannot obtain the free space. There is also a malloc failed hook function that can be defined that will be called when an allocation fails.