Server GC in CLR

The .NET CLR has a tonne of counters that allow you to get detailed information about what the CLR is doing with memory, Threading, garbage collection etc. Details in the MSDN guide at There are some other things that arent that well documented. For example the CLR's GC has two modes: Server GC and WorkStation GC as alluded to in this MSDN article.The default is the workstation gc, to enable the server the app.config file should contain something like
 <Configuration>
 <runtime>
 <gcServer enabled=“true“ />
 </runtime>
 </Configuration>
Also the GC can run concurrently (somewhat similar to parallelGC in Java) and is turned "on" by default. This is suitable for heavy user interaction based apps.To switch it off the configuration would need to be changed again to
<configuration>
 <runtime> 
 <gcConcurrent enabled="false"/>
 </runtime>
 </configuration> 
Also I came across a tip to use the SoS (Son of Strike) debugger in Visual studio for debugging apps that are a mix of managed/unmanaged code. To do this enable “unmanaged code” debugging option in Project properties-Debug and set a breakpoint in the code. When hit open the “immediate window” and load SOS debugger extension through the “.load sos” command. Here is a detailed article on using SoS
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

sameert

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today