Skip to content

Commit c2d3b35

Browse files
carlossanlopRon Petrusha
authored andcommitted
CoreCLR: Automatically port System.GC* triple slash comments to Docs (#2759)
* CoreCLR: Automatically port System.GC* triple slash comments to Docs * Add return for GetTotalAllocatedBytes * Fix some values * GCMemoryInfo summary * Update GC.xml * Update GCMemoryInfo.xml
1 parent 6a07294 commit c2d3b35

File tree

2 files changed

+47
-17
lines changed

2 files changed

+47
-17
lines changed

xml/System/GC.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -929,9 +929,9 @@ This method is most useful in monitoring scenarios for measuring the difference
929929
<Parameter Name="precise" Type="System.Boolean" Index="0" FrameworkAlternate="netcore-3.0" />
930930
</Parameters>
931931
<Docs>
932-
<param name="precise">To be added.</param>
933-
<summary>To be added.</summary>
934-
<returns>To be added.</returns>
932+
<param name="precise">If <see langword="true" />, gather a precise number; otherwise, gather an approximate count. Gathering a precise value entails a significant performance penalty.</param>
933+
<summary>Gets a count of the bytes allocated over the lifetime of the process.</summary>
934+
<returns>The total number of bytes allocated over the lifetime of the process.</returns>
935935
<remarks>To be added.</remarks>
936936
</Docs>
937937
</Member>

xml/System/GCMemoryInfo.xml

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</Attribute>
2020
</Attributes>
2121
<Docs>
22-
<summary>To be added.</summary>
22+
<summary>Provides a set of APIs that can be used to retrieve garbage collection information.</summary>
2323
<remarks>To be added.</remarks>
2424
</Docs>
2525
<Members>
@@ -39,9 +39,27 @@
3939
<ReturnType>System.Int64</ReturnType>
4040
</ReturnValue>
4141
<Docs>
42-
<summary>To be added.</summary>
43-
<value>To be added.</value>
44-
<remarks>To be added.</remarks>
42+
<summary>Gets the total fragmentation when the last garbage collection occurred.</summary>
43+
<value>An integer representing the total fragmentation when the last garbage collection occurred.</value>
44+
<remarks>
45+
<format type="text/markdown"><![CDATA[
46+
47+
## Remarks
48+
49+
For example, the application has the following five objects:
50+
51+
`| OBJ_A | OBJ_B | OBJ_C | OBJ_D | OBJ_E |`
52+
53+
If `OBJ_B`, `OBJ_C`, and `OBJ_E` are garbage collected but the heap is not compacted, the resulting heap will look like the following:
54+
55+
`| OBJ_A | F | OBJ_D |`
56+
57+
The memory between `OBJ_A` and `OBJ_D`, which is marked `F`, is considered part of the `FragmentedBytes` and is used to allocate new objects.
58+
59+
The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but will also be used to allocate new objects.
60+
61+
]]></format>
62+
</remarks>
4563
</Docs>
4664
</Member>
4765
<Member MemberName="HeapSizeBytes">
@@ -60,8 +78,8 @@
6078
<ReturnType>System.Int64</ReturnType>
6179
</ReturnValue>
6280
<Docs>
63-
<summary>To be added.</summary>
64-
<value>To be added.</value>
81+
<summary>Gets the total heap size when the last garbage collection occurred.</summary>
82+
<value>The total heap size, in bytes, when the last garbage collection occurred.</value>
6583
<remarks>To be added.</remarks>
6684
</Docs>
6785
</Member>
@@ -81,8 +99,8 @@
8199
<ReturnType>System.Int64</ReturnType>
82100
</ReturnValue>
83101
<Docs>
84-
<summary>To be added.</summary>
85-
<value>To be added.</value>
102+
<summary>Gets the high memory load threshold when the last garbage collection occured.</summary>
103+
<value>The high memory load threshold, in bytes, when the last garbage collection occured.</value>
86104
<remarks>To be added.</remarks>
87105
</Docs>
88106
</Member>
@@ -102,8 +120,8 @@
102120
<ReturnType>System.Int64</ReturnType>
103121
</ReturnValue>
104122
<Docs>
105-
<summary>To be added.</summary>
106-
<value>To be added.</value>
123+
<summary>Gets the memory load when the last garbage collection occurred.</summary>
124+
<value>The memory load when the last garbage collection occurred.</value>
107125
<remarks>To be added.</remarks>
108126
</Docs>
109127
</Member>
@@ -123,10 +141,22 @@
123141
<ReturnType>System.Int64</ReturnType>
124142
</ReturnValue>
125143
<Docs>
126-
<summary>To be added.</summary>
127-
<value>To be added.</value>
128-
<remarks>To be added.</remarks>
144+
<summary>Gets the total available memory for the garbage collector to use when the last garbage collection occurred.</summary>
145+
<value>The total available memory, in bytes, for the garbage collector to use when the last garbage collection occurred.</value>
146+
<remarks>
147+
<format type="text/markdown"><![CDATA[
148+
149+
## Remarks
150+
151+
This property value will be the value of the `COMPlus_GCHeapHardLimit` environment variable, or the `Server.GC.HeapHardLimit` value in `runtimeconfig.json`, if either is set.
152+
153+
If the program is run in a container, this value is an implementation-defined fraction of the container's size.
154+
155+
Otherwise, the value of the property is the physical memory on the machine that was available for the garbage collector to use when the last garbage collection occurred.
156+
157+
]]></format>
158+
</remarks>
129159
</Docs>
130160
</Member>
131161
</Members>
132-
</Type>
162+
</Type>

0 commit comments

Comments
 (0)