如何确定最佳的线程堆栈大小? [英] How to determine optimal thread stack size?
本文介绍了如何确定最佳的线程堆栈大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
实际上,有两种大小:最初提交和保留的总数.
Actually, two sizes: initially committed and total reserved.
您使用静态还是动态分析?哪些工具?哪些技术?
Do you use static or dynamic analysis? Which tools? Which techniques?
推荐答案
一种技术是将main或main线程中的堆栈绘制为已知值,然后在清除时从堆栈限制进行扫描,直到已知值为不再找到.
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.
您的堆栈末端将被定义为一个符号,生成一个.map文件来确定堆栈限制及其符号名称.
Your stack end will be defined as a symbol, generate a .map file to determine the stack limits and their symbol names.
此处讨论:如何确定最大堆栈使用量?
这篇关于如何确定最佳的线程堆栈大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文