I have a task that is called out by an ISR, when i press a button. This task creates another task. When i press the second button, ISR calls a third task that uses vTaskDelete to delete the second task.
Now before I create the second task, im checking available stack size by calling xPortGetFreeHeapSize(). I’m calling it again just after vTaskDelete deletes the second task. And the numbers don’t match. Why is that? I thought all the memory should be freed after calling vTaskDelete. After few ISR’s I’m getting a stack overflow. I’m using heap_2.c