<GCCpuGroup > 元素<GCCpuGroup> Element

指定垃圾回收是否支持多个 CPU 组。Specifies whether garbage collection supports multiple CPU groups.

<运行时 ><runtime>



特性和元素Attributes and Elements

下列各节描述了特性、子元素和父元素。The following sections describe attributes, child elements, and parent elements.


特性Attribute 描述Description
enabled 必需的特性。Required attribute.

指定垃圾回收是否支持多个 CPU 组。Specifies whether garbage collection supports multiple CPU groups.

enabled 特性enabled Attribute

“值”Value 描述Description
false 垃圾回收不支持多个 CPU 组。Garbage collection does not support multiple CPU groups. 这是默认设置。This is the default.
true 垃圾回收支持多个 CPU 组,如果启用服务器垃圾回收。Garbage collection supports multiple CPU groups, if server garbage collection is enabled.

子元素Child Elements


父元素Parent Elements

元素Element 描述Description
configuration 公共语言运行时和 .NET Framework 应用程序所使用的每个配置文件中的根元素。The root element in every configuration file used by the common language runtime and .NET Framework applications.
runtime 包含有关程序集绑定和垃圾回收的信息。Contains information about assembly binding and garbage collection.


如果计算机有多个 CPU 组并且启用了服务器垃圾回收 (请参阅 <gcServer >元素),启用此元素的所有 CPU 组扩展垃圾回收,并采用到的所有核心帐户创建和平衡堆时。When a computer has multiple CPU groups and server garbage collection is enabled (see the <gcServer> element), enabling this element extends garbage collection across all CPU groups and takes all cores into account when creating and balancing heaps.


此元素仅适用于垃圾回收线程。This element applies only to garbage collection threads. 若要启用要在所有 CPU 组分发用户线程的运行时,您还必须启用< Thread_UseAllCpuGroups >元素。To enable the runtime to distribute user threads across all CPU groups, you must also enable the <Thread_UseAllCpuGroups> element.


下面的示例演示如何启用多个 CPU 组的垃圾回收。The following example shows how to enable garbage collection for multiple CPU groups.

      <GCCpuGroup enabled="true"/>  
      <gcServer enabled="true"/>  

请参阅See also