Hmm, how do you need the details? If you just want to use memory, you can query GC. He knows.;)
long bytes = GC.GetTotalMemory(false); // use 'false' to not wait for next collect
The variable "bytes" will contain the number of bytes that are currently allocated in managed memory. I'm not sure if managed memory entails the whole process or just AppDomain. You will have to test this by running multiple AppDomains in the same process and seeing if the managed memory allocation is measured through the AppDomains. If this is not the case, you can use this to measure overall memory usage in an ASP.NET application.
If you need more specific information, there is a diagnostic API for the CLR with which you could interact. There are also many memory profilers, but if they work in an ASP.NET application, I cannot say.
John leidegren
source share