Re: Get remaining thread stack space
Thanks Carles. I made CONFIG_INIT_STACKS=y and used stack_unused_space_get to get what I wanted.
From: devel@... [mailto:devel@...] On Behalf Of Cufi, Carles
Sent: Sunday, October 28, 2018 3:10 PM
To: Gundi, Rajavardhan <rajavardhan.gundi@...>; devel@...
Subject: Re: [Zephyr-devel] Get remaining thread stack space
Enable CONFIG_INIT_STACKS=y and then use the STACK_ANALYZE() macro.
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.