Idle task clean up deleted tasks

michaeln32 wrote on Thursday, June 14, 2018:

Hi,
vTaskDelay remove tasks from ready, suspend, delay, delay overflow, to temination list and the memory of the deleted task (his TCB and stack) is not yet cleaned up.

In idle task (in function prvCheckTasksWaitingTermination()) the tasks that are listed in the termination list are removed from it and the task TCB is freed (only the TCB).

I know that the deleted tasks stacks should be freed also but I did’t find where it is happened.

Can you please tell me where the deleted task stack is freed ?

Thank you

Michael

michaeln32 wrote on Thursday, June 14, 2018:

Ok I found it - it is in vPortFreeAligned( pxTCB->pxStack );

Thanks

Michael

michaeln32 wrote on Thursday, June 14, 2018:

Ok I found it - it is in vPortFreeAligned( pxTCB->pxStack );

Thanks

Michael