I want to know if there any difference between main stack space and a task's stack space. I have taken up a quiz on RTOS in which the following question was asked
Suppose there is a non static local variable declared in the task function, where exactly the memory for the non static variable is allocated during the execution of task function ?
void task_function(void *p)
{
/*this is task function */
int i ; /* non static variable */
}
The options given were: a. Main stack space of RAM. b.Task's stack space.
I want to know if there is a separate main stack space of RAM other than the stack space allocated for each task. And if it is then why?
Main
function is meant, then it is not stored in the main stack space. - Mathieu Borderé