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: Windows 2000, Windows XP, Windows Server 2003 family
Header: CorProf.idl
Library: CorGuids.lib
.NET Framework Version: 2.0