Orion Edwards
Orion Edwards

Reputation: 123692

How can I determine how much memory my .NET program is using?

It seems to be often said that Task Manager does not provide an accurate indication of how much memory is in use by a process.

If this is indeed the case, what's the easiest way to find these things out?

I'd like to know:

Upvotes: 7

Views: 3850

Answers (7)

TheCodeMonk
TheCodeMonk

Reputation: 2099

I use memprofiler as well and it helped us out tremendously.

Upvotes: 0

flesh
flesh

Reputation: 23935

There are some good features in the SysInternals ProcessExplorer including a .NET profiler, though ANTS is the way to go if you need a pro tool.

Upvotes: 0

rbrayb
rbrayb

Reputation: 46818

Process Explorer will show you some of this if you double-click on on a process.

Upvotes: 0

Guge
Guge

Reputation: 4599

Start Performance Monitor (perfmon.exe) and take a look at the .Net CLR Memory performance object. Every running .net program has its own instance. You should be able to find what you want there.

Upvotes: 1

moobaa
moobaa

Reputation: 4532

Grab Process Explorer, right-click -> Properties the process in the list, and then click the ".NET" tab. Select ".NET CLR Memory" from the combobox, and you'll have more live info about your process than you'll know what to do with ;)

Upvotes: 8

Lars Truijens
Lars Truijens

Reputation: 43645

http://memprofiler.com/ is a very good .Net memory profiler. But Microsoft's build into Windows Performance Monitor (perfmon) will also give you those figures. See http://dotnetdebug.net/2005/06/30/perfmon-your-debugging-buddy/ for that.

Upvotes: 3

BobbyShaftoe
BobbyShaftoe

Reputation: 28499

There are some things you can do but I believe the best thing out there, if you're serious about profiling your application, is to use the Ants Profiler by Red Gate:

http://www.red-gate.com/Products/ants_profiler/index.htm

This software is really comprehensive and will give a good picture what sorts of memory usage and other sorts of metrics your app presents.

Upvotes: 1

Related Questions