This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Resource release on task termination?

Good day!

In my system, I have TI-RTOS configured to clean up deleted tasks.  I assume this also releases any stack the task had, is this true?

Also, is there a minimum time that it takes to have a task cleaned up?  I have some tasks that come and go and come and go pretty quickly and I'm worried that I might be trying to re-start a transient task before or at the same time as the old one is being cleaned up...

Thanks in advance!

Ed Averill

  • Hi Ed,
    Yes you're correct, setting Task_deleteTerminatedTask to true frees all allocations used by the Task once it terminates. The time it takes is the time your application takes to enter the idle task. The deleting happens in the idle task so you have to be careful that your application isn't too unyielding and doesn't run the idle task which can lead to a situation where you're creating tasks faster than you're deleting.

    Let me know if this helps.

    Regards,
    Moses
  • That's exactly what I needed to know - thanks!

    Ed Averill