GCKind Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the kind of a garbage collection.
public enum class GCKind
public enum GCKind
type GCKind =
Public Enum GCKind
- Inheritance
Fields
Any | 0 | Any kind of collection. |
Background | 3 | A background collection. This is always a generation 2 collection. |
Ephemeral | 1 | A gen0 or gen1 collection. |
FullBlocking | 2 | A blocking gen2 collection. |
Remarks
A GC can be one of the 3 kinds - ephemeral, full blocking, or background. Their frequencies are very different. Ephemeral GCs happen much more often than the other two kinds. Background GCs usually happen infrequently, and full blocking GCs usually happen very infrequently. In order to sample the very infrequent GCs, collections are separated into kinds so callers can ask for all three kinds while maintaining a reasonable sampling rate. For example, if you're sampling once every second, without this distinction, you may never observe a background GC. With this distinction, you can always get info of the last GC of the kind you specify.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈