Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I figure out how much memory a .Net Appdomain is consuming?

Tags:

.net

clr

I'm trying to programmatically restrict the memory consumption of plugins running in a .Net AppDomain, but I can't find any setup parameters for this, nor can I find a way to query an AppDomain to figure out how much memory it is consuming. Any ideas?

like image 894
Brett Avatar asked Aug 25 '08 14:08

Brett


2 Answers

Old question, but in the meantime (since .Net framework 4.0) a new solution is available. You will have to enable ARM (Application domain Resource Monitoring). From that point on, you can request information on total consumed processor time, memory usage etc.

See Microsoft documentation over here

like image 109
Björn Boxstart Avatar answered Nov 06 '22 21:11

Björn Boxstart


Not sure programatically, but Process Explorer can tell you how much memory a .net AppDomain is using. Maybe they have some documentation out there about how they are querying that info.

like image 22
TheEmirOfGroofunkistan Avatar answered Nov 06 '22 20:11

TheEmirOfGroofunkistan