堆栈溢出?

2019-07-14 13:20发布

做的一个流量计。DEBUG的时候提示

Sun Mar 17, 2013 11:13:14: The stack 'Stack' is filled to 95% (76 bytes used out of 80). The warning threshold is set to 90.%
Sun Mar 17, 2013 11:13:37: Breakpoint hit: Code @ TEMP_PRESS.c:191.5
Sun Mar 17, 2013 11:13:37: The stack 'Stack' is filled to 100% (80 bytes used out of 80). The warning threshold is set to 90.%
Sun Mar 17, 2013 11:13:41: Breakpoint hit: Code @ TEMP_PRESS.c:191.5
Sun Mar 17, 2013 11:13:41: The stack 'Stack' is filled to 100% (80 bytes used out of 80). The warning threshold is set to 90.%
Sun Mar 17, 2013 11:14:28: Breakpoint hit: Code @ TEMP_PRESS.c:191.5

一开始使用95%  后来一直就是100% 这是什么原因呢? 有什么危害?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
18条回答
shimx
2019-07-15 15:26
一般的调试器会预先用某个特定值比如0xFF来初始化所有的堆栈

然后在每次代码中断运行,进入调试状态的时候去检查一下堆栈,看看堆栈内的数据有多少已经不是0xFF,就意味着代码已经使用了多少堆栈

一周热门 更多>