From 61590559780cdec2100808cf75379e1c8aa0078d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 13:43:53 +0000 Subject: [PATCH 1/3] Update FixedAddressValueTypeAttribute docs per feedback --- .../FixedAddressValueTypeAttribute.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml b/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml index c4b182f9f21..49ab32a30c5 100644 --- a/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml +++ b/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml @@ -54,11 +54,11 @@ attribute to mark static value types as pinned upon creation. + Use the attribute to mark static value types as pinned upon creation. This attribute does not apply to primitive value type and enum fields. This attribute is used by the Microsoft Visual C++ compiler. - Static value type fields are created as boxed objects. This means that their address can change as garbage collection is performed. When you apply this attribute to a static value type, its address remains constant during its lifetime. + The storage for static fields may be allocated on GC heap. This means that their address can change as garbage collection is performed. When you apply this attribute to a static value type, its address remains constant during its lifetime. ## Examples The following example illustrates the use of the attribute to pin a static field in memory. It defines an `Age` structure and initializes two classes that have static fields of type `Age`. The second class applies to pin the field's address. A number of memory allocations are made before and after these two objects are instantiated and the garbage collector is invoked. The output from the example shows that although the address of the first `Age` field has changed after garbage collection, the address of the field to which is applied has not. From 89295277598e1ce52979c146ded6a99f0a010508 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sun, 21 Jun 2026 06:47:59 -0700 Subject: [PATCH 2/3] Apply suggestion from @jkotas --- .../FixedAddressValueTypeAttribute.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml b/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml index 49ab32a30c5..0f16b172eaa 100644 --- a/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml +++ b/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml @@ -54,7 +54,7 @@ attribute to mark static value types as pinned upon creation. This attribute does not apply to primitive value type and enum fields. + Use the attribute to mark static value type fields as pinned upon creation. This attribute does not apply to primitive value type and enum fields. This attribute is used by the Microsoft Visual C++ compiler. From 44bafdc3024c5cc4976f2d466308a193aeb2cb7e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 13:53:33 +0000 Subject: [PATCH 3/3] Fix remarks wording: replace 'may' with 'might', add 'the' before 'GC heap', use 'field' consistently --- .../FixedAddressValueTypeAttribute.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml b/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml index 0f16b172eaa..e6ababa04d4 100644 --- a/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml +++ b/xml/System.Runtime.CompilerServices/FixedAddressValueTypeAttribute.xml @@ -58,7 +58,7 @@ This attribute is used by the Microsoft Visual C++ compiler. - The storage for static fields may be allocated on GC heap. This means that their address can change as garbage collection is performed. When you apply this attribute to a static value type, its address remains constant during its lifetime. + The storage for static value type fields might be allocated on the GC heap. This means that their address can change as garbage collection is performed. When you apply this attribute to a static value type field, its address remains constant during its lifetime. ## Examples The following example illustrates the use of the attribute to pin a static field in memory. It defines an `Age` structure and initializes two classes that have static fields of type `Age`. The second class applies to pin the field's address. A number of memory allocations are made before and after these two objects are instantiated and the garbage collector is invoked. The output from the example shows that although the address of the first `Age` field has changed after garbage collection, the address of the field to which is applied has not.