Idle task clean up deleted tasks

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

Idle task clean up deleted tasks

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

Idle task clean up deleted tasks

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