From f64d5df3485499ef7bfece42ed934b0f4d69c6ec Mon Sep 17 00:00:00 2001 From: David Mason Date: Fri, 24 Apr 2020 03:31:33 -0700 Subject: [PATCH 1/5] update COR_PRF_GC_GENERATION --- .../profiling/cor-prf-gc-generation-enumeration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md index 5d74faa6b70a6..a773d2222e32e 100644 --- a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md +++ b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md @@ -25,7 +25,7 @@ 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_LARGE_OBJECT_HEAP = 3, } COR_PRF_GC_GENERATION; ``` From 85bc6bc5b8a633a30b4105adec6753e1888d8101 Mon Sep 17 00:00:00 2001 From: David Mason Date: Fri, 24 Apr 2020 11:24:10 -0700 Subject: [PATCH 2/5] actually add the changes --- .../profiling/cor-prf-gc-generation-enumeration.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md index a773d2222e32e..aad4df633c80c 100644 --- a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md +++ b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md @@ -26,6 +26,8 @@ typedef enum { COR_PRF_GC_GEN_1 = 1, COR_PRF_GC_GEN_2 = 2, COR_PRF_GC_LARGE_OBJECT_HEAP = 3, + COR_PRF_GC_PINNED_OBJECT_HEAP= 4 + C } COR_PRF_GC_GENERATION; ``` @@ -37,9 +39,10 @@ typedef enum { |`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.| +|`COR_PRF_GC_PINNED_OBJECT_HEAP`|The object is stored in the pinned 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 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 two special heap segments. The first special segment is used for large objects. Objects whose size is larger than a particular value are stored in the large-object heap. The second special segment is the pinned object heap. The pinned object heap is a heap where pinned objects can be allocated to avoid the performance cost of allocating pinned objects 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. The use of generations means that the garbage collector has to work with only a subset of the allocated objects at any one time. From 43c634e35861d534f83ed1790b05c7a10713e176 Mon Sep 17 00:00:00 2001 From: David Mason Date: Fri, 24 Apr 2020 13:47:25 -0700 Subject: [PATCH 3/5] Apply suggestions from code review Co-Authored-By: Genevieve Warren --- .../profiling/cor-prf-gc-generation-enumeration.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md index aad4df633c80c..9d5ae9857e56b 100644 --- a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md +++ b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md @@ -39,10 +39,12 @@ typedef enum { |`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.| -|`COR_PRF_GC_PINNED_OBJECT_HEAP`|The object is stored in the pinned object heap.| +|`COR_PRF_GC_PINNED_OBJECT_HEAP`|The object is stored in the pinned-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 two special heap segments. The first special segment is used for large objects. Objects whose size is larger than a particular value are stored in the large-object heap. The second special segment is the pinned object heap. The pinned object heap is a heap where pinned objects can be allocated to avoid the performance cost of allocating pinned objects 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. + 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. + + 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. The use of generations means that the garbage collector has to work with only a subset of the allocated objects at any one time. From 53f24da83f884888f4118366c5afefc288f4a391 Mon Sep 17 00:00:00 2001 From: David Mason Date: Fri, 24 Apr 2020 13:50:22 -0700 Subject: [PATCH 4/5] add space to satisfy linter --- .../profiling/cor-prf-gc-generation-enumeration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md index 9d5ae9857e56b..8cdac40d410d7 100644 --- a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md +++ b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md @@ -43,7 +43,7 @@ typedef enum { ## 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, and two special heap segments, one for large objects and one for pinned objects. - + 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. The use of generations means that the garbage collector has to work with only a subset of the allocated objects at any one time. From d0453cf53a7ded38f5041302e839e53c5e44a026 Mon Sep 17 00:00:00 2001 From: David Mason Date: Fri, 24 Apr 2020 14:01:00 -0700 Subject: [PATCH 5/5] Update docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md Co-Authored-By: Genevieve Warren --- .../unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md index 8cdac40d410d7..c6f3badf141f6 100644 --- a/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md +++ b/docs/framework/unmanaged-api/profiling/cor-prf-gc-generation-enumeration.md @@ -27,7 +27,6 @@ typedef enum { COR_PRF_GC_GEN_2 = 2, COR_PRF_GC_LARGE_OBJECT_HEAP = 3, COR_PRF_GC_PINNED_OBJECT_HEAP= 4 - C } COR_PRF_GC_GENERATION; ```