I'm using Visual Studio 2013 on Windows 7 - 64 bit machine.
I'm writing a program on 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
Heap consumption , externally & non programatically : You can use MS Technet`s 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
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.