C# memory profile

狂风中的少年 提交于 2019-11-30 05:30:34

问题


I'm trying to perform some memory profiling on an applications that is accumulating large amounts of memory.

I have found this tool (CLRProfiler): http://msdn.microsoft.com/en-us/library/ff650691.aspx

But it does not seem to be working. When I run it, it sits forever at "Waiting for application to start common language runtime".

Any other suggestions on how I can profile memory in C#?


回答1:


Check out Redgate:

http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/




回答2:


If you work with W7 or Vista, start it as administrator (File->ContextMenu->Run as Administrator). As already said by others, also check out to use the correct version.




回答3:


You are probably using the wrong version!

The new (v4.0) version is at http://www.microsoft.com/en-us/download/details.aspx?id=16273, which is working well for me (and it's free).




回答4:


If your project is set to build x86, then you have to use the 32 bit version, even if your OS is 64 bit.




回答5:


You can use a commercial product like ants memory profiler (red-gate) or dotTrace (jetbrains).

Both are very easy to get started with.



来源:https://stackoverflow.com/questions/6144084/c-sharp-memory-profile

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!