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.

DSP/BIOS dynamic task heaps

I have a question about heaps with dynamically created DSP/BIOS tasks - is there only one system heap, or does all information associated with a heap get created (and deleted) along with the task?

My application is one where I cannot guarantee that a dynamic task will free up all its memory on completion. So - will the deletion of the task, and then re-spawn protect me against memory leaks?

 

  • John,

    BIOS does not track memory allocated by a task, so your application needs to free any memory allocated. This even extends to dynamic tasks. Each TSK_create or Task_create must have a corresponding TSK_delete or Task_delete to free the memory used by the task object (including its stack). In general, heaps are independent of tasks, so you need to insure you match MEM_alloc or Memory_alloc calls with corresponding MEM_free or Memory_free calls.

    Mark