views:

312

answers:

2

How can I configure an application, or even an entire machine, to use either the server or workstation flavor of the CLR's garbage collection?

+2  A: 

Have a look here.

I recommend giving the entire series of blog posts a good read - very informative.

Yuval
Thanks, that answers the question about how to do this on an application level. Can it be set for an entire machine?
fatcat1111
I believe so - app.config is essentially a 'specialization' of the machine.config file which controls settings for the entire machine. IIRC, it's located under %SYSTEM%\Microsoft.NET\Framework\vXXXX\<don't remember the rest>.However, I would have to ask - are you sure you want to change this?
Yuval
%SYSTEM%\Microsoft.NET\Framework\v1.14322|v2.0.50727\CONFIG\Machine.config
Kev
A: 

I should mention that I found there are two ways of handling this, either for the entire application using a .config file (application or machine), using the gcConcurrent and gcServer elements, or it can be done on a code block level using GCSettings.LatencyMode.

fatcat1111