Using vTaskList

michaeln32 wrote on Thursday, January 11, 2018:

Hi,
I’m created task with depth of 1024 ( total of stack size of 4,096 byte + 64 bytes for TCB).
So the total task size is 4,160 bytes.

But when I useing vTaskList(), I get from this API that the size of the task is 5,336.

Can you please help me with this issue ?

Best Regards

Michael

rtel wrote on Thursday, January 11, 2018:

I don’t have an immediate answer to that.

Which chip are you using?

Are you calling vTaskList() before the task has executed, or after?

Can you step into the vTaskList() code in the debugger to see why it
comes up with this number? It might be easier to call
https://www.freertos.org/uxTaskGetStackHighWaterMark.html as it will
only execute the part of the code of interest - the stack high water
mark calculation.