如何衡量线程堆栈的使用情况? [英] How to measure a thread stack usage?

查看:120
本文介绍了如何衡量线程堆栈的使用情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我需要测量在线程中调用函数时使用了多少堆栈。如果我在thead的启动函数中执行此操作,我将获得有关线程的堆栈使用情况的一些信息。这有助于我创建具有适当堆栈大小的线程。

mr.abzadeh



编辑:为什么没有反应?伙计在哪里?

解决方案

参考



改善净性能部分17测量净应用-performance / [ ^ ]



自定义计数器 [ ^ ]



Increasing-the-size-of-your-stack-net-memory-管理 [ ^ ]


我不知道知道你创建了多少个线程,但如果这是一个持久的问题,Windows会提供一个api。

你有理由认为你的线程已经用完了吗?



这里有一个解决方案: http://stackoverflow.com/questions/1740888/determining-stack-space-with-visual-studio/1747499#1747499 [ ^ ]使用 http://en.wikipedia.org/wiki/Win32_Thread_Information_Block [ ^ ]

hai

试试这个链接



检测应用程序空闲状态 [ ^ ]



但你需要编码语言


Hello guys.
I need to measure how much stack is used when I call a function in a thread. If I do this at the starting function of a thead, I will get some information about stack usage of thread. This helps me create threads with appropriate stack size.
mr.abzadeh

Edit: Why no respnce? where are guys?

解决方案

Refer

improving-net-performance-part-17-measuring-net-application-performance/[^]

Custom Counters[^]

Increasing-the-size-of-your-stack-net-memory-management[^]


I don't know how many threads you are creating but if this were a persistent issue Windows would provide an api.
Do you have any reason to think that your threads are running out of stack?

There is a solution here: http://stackoverflow.com/questions/1740888/determining-stack-space-with-visual-studio/1747499#1747499[^]using http://en.wikipedia.org/wiki/Win32_Thread_Information_Block[^]


hai
try this link

Detecting Application Idleness[^]

but u need to code language


这篇关于如何衡量线程堆栈的使用情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆