Re: Get remaining thread stack space

Carles Cufi



Enable CONFIG_INIT_STACKS=y and then use the STACK_ANALYZE() macro.




From: <devel@...> on behalf of Raj Gundi <rajavardhan.gundi@...>
Date: Sunday, 28 October 2018 at 08:47
To: "devel@..." <devel@...>
Subject: [Zephyr-devel] Get remaining thread stack space




Is there a way to get the remaining stack space of a thread in Zephyr? For e.g. if a thread is configured to use a max stack space of 512 bytes, is there a way to find out the actual stack used by the thread? If the actual stack space used is 200 bytes, the unutilized space would be 312 bytes.





Join to automatically receive all group messages.