简体   繁体   English

如何从我的程序使用的堆和堆栈中检查多少?

[英]How to check how much from heap and from stack my program is using?

I'm using Visual Studio 2013 on Windows 7 - 64 bit machine. 我在Windows 7 - 64位计算机上使用Visual Studio 2013。
I'm writing a program on C. 我在C上写一个程序
How can I check how much heap and stack storage my program is using? 如何检查程序使用的堆和堆栈存储量?

Heap consumption , internally & externally ( programatically ) : You can use GetProcessMemory function : https://msdn.microsoft.com/en-us/library/ms683219.aspx 内部和外部的堆消耗(以编程方式):您可以使用GetProcessMemory函数: https ://msdn.microsoft.com/en-us/library/ms683219.aspx

Heap consumption , externally & non programatically : You can use MS Technet`s VMMap : https://technet.microsoft.com/en-us/sysinternals/vmmap.aspx 堆耗,外部和非编程:您可以使用MS Technet的VMMap: https ://technet.microsoft.com/en-us/sysinternals/vmmap.aspx

Stack consumption , internally ( programatically ) : You can use Windows thread information block : https://stackoverflow.com/a/1747249/1996740 堆栈消耗,内部(以编程方式):您可以使用Windows线程信息块: https//stackoverflow.com/a/1747249/1996740

Stack consumption , externally & programatically : Here is a nice answer showing how you can access an external thread`s thread information block : https://stackoverflow.com/a/8751576/1996740 外部和编程的堆栈消耗:这是一个很好的答案,显示如何访问外部线程的线程信息块: https ://stackoverflow.com/a/8751576/1996740

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM