Skip to content

Commit 4f2a190

Browse files
Automatically port 5.0 System.Runtime.CompilerServices documentation (#4285)
* Automatically port System.Runtime.CompilerServices 5.0 docs * suggestions by gewarren Co-authored-by: Genevieve Warren <[email protected]> * suggestion by gewarren Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: Genevieve Warren <[email protected]>
1 parent 5dc3904 commit 4f2a190

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

xml/System.Runtime.CompilerServices/RuntimeHelpers.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@
8686
<Parameter Name="size" Type="System.Int32" Index="1" FrameworkAlternate="net-5.0" />
8787
</Parameters>
8888
<Docs>
89-
<param name="type">To be added.</param>
90-
<param name="size">To be added.</param>
91-
<summary>To be added.</summary>
92-
<returns>To be added.</returns>
89+
<param name="type">The type associated with the allocated memory.</param>
90+
<param name="size">The amount of memory to allocate, in bytes.</param>
91+
<summary>Allocates memory that's associated with the <paramref name="type" /> and is freed if and when the <see cref="T:System.Type" /> is unloaded.</summary>
92+
<returns>The allocated memory.</returns>
9393
<remarks>To be added.</remarks>
9494
</Docs>
9595
</Member>

xml/System.Runtime.CompilerServices/SkipLocalsInitAttribute.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@
1919
</Attribute>
2020
</Attributes>
2121
<Docs>
22-
<summary>To be added.</summary>
23-
<remarks>To be added.</remarks>
22+
<summary>Indicates to the compiler that the .locals init flag should not be set in nested method headers when emitting to metadata.</summary>
23+
<remarks>
24+
<format type="text/markdown"><![CDATA[
25+
26+
## Remarks
27+
28+
This attribute is unsafe, because it may reveal uninitialized memory to the application in certain instances (for example, reading from uninitialized stack-allocated memory). If applied to a method directly, the attribute applies to that method and all its nested functions, including lambdas and local functions. If applied to a type or module, it applies to all methods nested inside. This attribute is intentionally not permitted on assemblies. To apply the attribute to multiple type declarations, use it at the module level instead.
29+
30+
]]></format>
31+
</remarks>
2432
</Docs>
2533
<Members>
2634
<Member MemberName=".ctor">

0 commit comments

Comments
 (0)