开发者

Retrieve Heap memory size and its usage statistics etc...?

开发者 https://www.devze.com 2023-01-03 20:54 出处:网络
Lets say I open some application or process. Did some work with that. Now I closed it. Need to know whether this application caused any memory leak.

Lets say I open some application or process. Did some work with that. Now I closed it.

Need to know whether this application caused any memory leak. i.e used up some heap memory and not cleared开发者_如何学C it properly.

Can I get this statistics some how? I'm using Visual Studio (for development) under Windows OS.

Even I would be interested in knowing this information for any 3rd party application.


When an application closes all resources are automatically released by Windows.

A quick & dirty tool to get an indication for memory/resource-leaks inside an application is Perfmon.

The actions executed by an application, can cause other processes to use more memory. SQL Server can make its cache size bigger, maybe you have opened Word or Explorer, the Windows Search engine might kick in because you saved some file. The virus scanner can be more active, etc.....


Have a look at CrtSetDbgFlag:

http://msdn.microsoft.com/en-us/library/5at7yxcs(v=VS.100).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号