Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
861 views
in Technique[技术] by (71.8m points)

.net 4.0 - C# GC for Server

Is Server GC (gcServer flag in configuration) available in .Net 4.0? Or it was deprecated?

Thank you!!!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Yes, it's (still available). No, it isn't (deprecated).

Why the question?

A link on the argument http://architecturebyashwani.blogspot.com/2010/02/foreground-gc-and-background-gc.html

There is even a new GC (background for workstation mode) in 4.0, so in the end there are three GC; server, workstation concurrent on, workstation concurrent off.

The three settings for web.config/app.config are:

<configuration> 
    <runtime> 
        <gcConcurrent enabled="false"/> 
<!-- or -->
        <gcConcurrent enabled="true"/> 
<!-- or -->
        <gcServer enabled="true"/> 
    </runtime> 
</configuration> 

The three or are "exclusive". You can enable only ONE option at a time :-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...