COR_PRF_GC_GENERATION Enumeration
Identifies a garbage-collection generation.
typedef enum {
COR_PRF_GC_GEN_0 = 0,
COR_PRF_GC_GEN_1 = 1,
COR_PRF_GC_GEN_2 = 2,
COR_PRF_GC_LARGE_OBJECT_HEAP = 3
} COR_PRF_GC_GENERATION;
Members
Member |
Description |
---|---|
COR_PRF_GC_GEN_0 |
The object is stored as generation 0. |
COR_PRF_GC_GEN_1 |
The object is stored as generation 1. |
COR_PRF_GC_GEN_2 |
The object is stored as generation 2. |
COR_PRF_GC_LARGE_OBJECT_HEAP |
The object is stored in the large-object heap. |
Remarks
The garbage collector improves memory management performance by dividing objects into generations based on age. The garbage collector currently uses three generations, numbered 0, 1, and 2, plus a special heap segment that is used for large objects. Objects whose size is larger than a particular value are stored in the large-object heap. Other allocated objects start out belonging to generation 0. All objects that exist after garbage collection occurs in generation 0 are promoted to generation 1. Objects that exist after garbage collection occurs in generation 1 move into generation 2.
The use of generations means that the garbage collector has to work with only a subset of the allocated objects at any one time.
The COR_PRF_GC_GENERATION enumeration is used by the COR_PRF_GC_GENERATION_RANGE structure.
Requirements
Platforms: See .NET Framework System Requirements.
Header: CorProf.idl, CorProf.h
Library: CorGuids.lib
.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0