uxTaskGetStackHighWaterMark Appears to be in Bytes
Posted: Tue Mar 23, 2021 2:38 pm
Hi All,
Per the documentation, uxTaskGetStackHighWaterMark is supposed to be in words: https://docs.espressif.com/projects/esp ... skHandle_t
However, this does not appear to be so. When I create a task, I am clear the task stack size is specified in bytes: https://docs.espressif.com/projects/esp ... skHandle_t
However, when I call uxTaskGetStackHighWaterMark on a task with a stack size of 8192 bytes, I am getting back values like 6036. This value only makes sense if the value it returns is in bytes. Otherwise it would mean the minimum free was ~24k, which greatly exceeds the value I specified for the task size in xTaskCreate().
Can someone clarify if the documentation is wrong on this?
Thanks!
Per the documentation, uxTaskGetStackHighWaterMark is supposed to be in words: https://docs.espressif.com/projects/esp ... skHandle_t
However, this does not appear to be so. When I create a task, I am clear the task stack size is specified in bytes: https://docs.espressif.com/projects/esp ... skHandle_t
However, when I call uxTaskGetStackHighWaterMark on a task with a stack size of 8192 bytes, I am getting back values like 6036. This value only makes sense if the value it returns is in bytes. Otherwise it would mean the minimum free was ~24k, which greatly exceeds the value I specified for the task size in xTaskCreate().
Can someone clarify if the documentation is wrong on this?
Thanks!