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;  

MemberDescription
COR_PRF_GC_GEN_0The object is stored as generation 0.
COR_PRF_GC_GEN_1The object is stored as generation 1.
COR_PRF_GC_GEN_2The object is stored as generation 2.
COR_PRF_GC_LARGE_OBJECT_HEAPThe object is stored in the large-object heap.

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.

Platforms: See System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: Available since 2.0

Profiling Enumerations

Show: