A co-worker said this is possible (but it looks a bit strange to me).
If there's a way to do it, where can I do this?
I'm talking about winXP OS.
views:
180answers:
2
A:
Don't do it. I profiled it, and even on 3.5 it got significantly worse (where the CLR 4 has an even more awesome GC).
280Z28
2009-08-12 17:42:50
What exactly did you profile? (just curious)
Henk Holterman
2009-08-12 17:44:20
At the time I was profiling a compiler - the lexer/parser was causing some issues allocating tens of millions of objects in rapid succession.
280Z28
2009-08-12 17:48:21
But what did you do regarding the GC?
Henk Holterman
2009-08-12 19:57:21
+7
A:
Yes, the GC has two modes of operation: Server and Workstation. You can change modes in either your app.config (per application) or machine.config. See http://blogs.msdn.com/junfeng/archive/2004/07/13/181534.aspx for more information.
<Configuration>
<runtime>
<gcServer enabled="false" />
<gcConcurrent enabled="true" />
</runtime>
</Configuration>
For gcServer
:
- false - Does not run server garbage collection. This is the default.
- true - Runs server garbage collection.
For gcConcurrent
:
- false - Does not run garbage collection concurrently.
- true - Runs garbage collection concurrently. This is the default.
In general, however, you don't want to change the GC operation mode, especially on a machine level unless you have a really, really good reason to. Generally the only things that care about this are unmanaged applications that are hosting the CLR themselves (such as SQL Server or IIS).
Scott Dorman
2009-08-12 17:45:20
Don't forget gcConcurrent, though not really a mode, it is (can be) a machine wide config to the GC
Marc
2009-08-12 17:50:52
Tess Fernandez has a great article that includes details on the different GC modes -> http://blogs.msdn.com/tess/archive/2008/04/17/how-does-the-gc-work-and-what-are-the-sizes-of-the-different-generations.aspx
adrianbanks
2009-08-12 18:21:33