tags:

views:

580

answers:

2

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?

+1  A: 

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.

TheImirOfGroofunkistan
A: 

Here's the documentation for querying a process's memory usage. Not the same as the AppDomain, but it might be a place to start.

http://msdn.microsoft.com/en-us/library/s80a75e5(VS.80).aspx

You can ask the GC what it thinks is currently allocated also.

http://msdn.microsoft.com/en-us/library/system.gc.gettotalmemory(VS.71).aspx

Ben Robbins