Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is gcServer true by default on server editions of Windows?

I have a .Net 4.0 Win Forms app that I run on two boxes, one is a Win7 box, one is a Win Server 2k3 box. The app on the 2k3 box has 2-3 intermittent hangs throughout the day that appear to be large garbage collections, while the win7 box never has these long garbage collections. Is it possible that the default GC on Win2k3 is different than the default on Win7?

like image 280
Superman Avatar asked Apr 13 '11 04:04

Superman


1 Answers

No, it has not changed, as documented here: http://msdn.microsoft.com/en-us/library/ms229357.aspx

The following prints false:

Console.WriteLine(System.Runtime.GCSettings.IsServerGC);

Try for yourself to make sure another developer hasn't tinkered with the configuration. :)

like image 117
Jason Kresowaty Avatar answered Oct 04 '22 19:10

Jason Kresowaty