Skip to content

Commit d97c78d

Browse files
authored
Merge pull request #18056 from davmason/master
Update COR_PRF_GC_GENERATION
2 parents 24683ec + d0453cf commit d97c78d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ typedef enum {
2525
COR_PRF_GC_GEN_0 = 0,
2626
COR_PRF_GC_GEN_1 = 1,
2727
COR_PRF_GC_GEN_2 = 2,
28-
COR_PRF_GC_LARGE_OBJECT_HEAP = 3
28+
COR_PRF_GC_LARGE_OBJECT_HEAP = 3,
29+
COR_PRF_GC_PINNED_OBJECT_HEAP= 4
2930
} COR_PRF_GC_GENERATION;
3031
```
3132

@@ -37,9 +38,12 @@ typedef enum {
3738
|`COR_PRF_GC_GEN_1`|The object is stored as generation 1.|
3839
|`COR_PRF_GC_GEN_2`|The object is stored as generation 2.|
3940
|`COR_PRF_GC_LARGE_OBJECT_HEAP`|The object is stored in the large-object heap.|
41+
|`COR_PRF_GC_PINNED_OBJECT_HEAP`|The object is stored in the pinned-object heap.|
4042

4143
## Remarks
42-
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.
44+
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, and two special heap segments, one for large objects and one for pinned objects.
45+
46+
Objects whose size is larger than a threshold value are stored in the large-object heap. Pinned objects can be allocated to the pinned-object heap to avoid the performance cost of allocating them on the normal heaps. 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.
4347

4448
The use of generations means that the garbage collector has to work with only a subset of the allocated objects at any one time.
4549

0 commit comments

Comments
 (0)