<GCCpuGroup > 元素<GCCpuGroup> Element

指定記憶體回收是否支援多個 CPU 群組。Specifies whether garbage collection supports multiple CPU groups.

<configuration> <configuration>
   <執行時間 >   <runtime>
     <GCCpuGroup >    <GCCpuGroup>

語法Syntax

<GCCpuGroup
   enabled="true|false"/>

屬性和元素Attributes and Elements

下列章節說明屬性、子元素和父元素。The following sections describe attributes, child elements, and parent elements.

屬性Attributes

屬性Attribute 描述Description
enabled 必要屬性。Required attribute.

指定記憶體回收是否支援多個 CPU 群組。Specifies whether garbage collection supports multiple CPU groups.

啟用屬性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

None。None.

父項目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.

備註Remarks

當電腦具有多個 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.

範例Example

下列範例顯示如何啟用多個 CPU 群組的垃圾收集。The following example shows how to enable garbage collection for multiple CPU groups.

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

另請參閱See also