How to determine optimal thread stack size?

允我心安 提交于 2019-12-19 07:38:09

问题


Actually, two sizes: initially committed and total reserved.

Do you use static or dynamic analysis? Which tools? Which techniques?


回答1:


One technique is to paint your stack in main or the threads main with a known value and then on cleanup do a sweep from the stack limit until your known value is no longer found.

Your stack end will be defined as a symbol, generate a .map file to determine the stack limits and their symbol names.

It is discussed here: How to determine maximum stack usage?



来源:https://stackoverflow.com/questions/177516/how-to-determine-optimal-thread-stack-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!