Task Stack Size

chinamaykumar wrote on Thursday, May 15, 2008:

Hi all,

i configure stack size of task=270.
i created a task which call many functions.
where all local variables of these function called by task  will be stored?
is this memoey initialisation done by rtos or at compile time?

fojtik wrote on Thursday, May 15, 2008:

Looking into a source code a heap is used:

/* Allocate space for the stack used by the task being created.
   The base of the stack memory stored in the TCB so the task can
   be deleted later if required. */
pxNewTCB->pxStack = ( portSTACK_TYPE * ) pvPortMalloc( ( ( size_t )usStackDepth ) * sizeof( portSTACK_TYPE ) );