You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System/GCMemoryInfo.xml
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@
30
30
31
31
## Remarks
32
32
33
-
A garbage collection (GC) is identified by its <xref:System.GCMemoryInfo.Index>, which starts from 1 and increases with each GC. If you are asking for a GC that doesn't exist, for example, you called the <xref:System.GC.GetGCMemoryInfo%2A> method before a GC happened, or you're asking for a GC of <xref:System.GCKind.FullBlocking?displayProperty=nameWithType> and no full blocking GCs have happened, you will get all 0's in the info, including the <xref:System.GCMemoryInfo.Index>. You can use index 0 to detect that no GCs, or no GCs of the kind you specified, have occurred.
33
+
A garbage collection (GC) is identified by its <xref:System.GCMemoryInfo.Index>, which starts from 1 and increases with each GC. If you ask for a GC that doesn't exist, you'll get all 0's in the info, including the <xref:System.GCMemoryInfo.Index>. For example, you'll get 0's if you call the <xref:System.GC.GetGCMemoryInfo%2A> method before a GC has happened, or you ask for a GC of <xref:System.GCKind.FullBlocking?displayProperty=nameWithType> and no full blocking GCs have happened. You can use index 0 to detect that no GCs, or no GCs of the kind you specified, have occurred.
34
34
35
35
]]></format>
36
36
</remarks>
@@ -57,7 +57,7 @@ A garbage collection (GC) is identified by its <xref:System.GCMemoryInfo.Index>,
57
57
<summary>Gets a value that indicates if this is a compacting GC or not.</summary>
58
58
<value>
59
59
<seelangword="true" /> if this is a compacting GC; <seelangword="false" /> otherwise.</value>
60
-
<remarks>To be added.</remarks>
60
+
<remarks>A compacting GC is when space occupied by dead objects is reclaimed and surviving objects are compacted.</remarks>
61
61
</Docs>
62
62
</Member>
63
63
<MemberMemberName="Concurrent">
@@ -82,6 +82,7 @@ A garbage collection (GC) is identified by its <xref:System.GCMemoryInfo.Index>,
82
82
<value>
83
83
<seelangword="true" /> if this is a concurrent GC (background GC); <seelangword="false" /> otherwise.</value>
@@ -243,7 +244,7 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but is
243
244
<Docs>
244
245
<summary>Gets the high memory load threshold when the last garbage collection occurred.</summary>
245
246
<value>The high memory load threshold, in bytes, when the last garbage collection occurred.</value>
246
-
<remarks>To be added.</remarks>
247
+
<remarks>Most of the GC performance heuristics are based on per-process measurements. However, to avoid paging, GC is aware of the global physical memory load on the machine or VM or in the container. GC recognizes a certain memory load percentage as a "high memory load situation". When the memory load percentage is over that threshold, GC becomes more aggressive and will do more full blocking GCs if necessary to reduce the heap size.</remarks>
247
248
</Docs>
248
249
</Member>
249
250
<MemberMemberName="Index">
@@ -264,10 +265,10 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but is
264
265
<ReturnType>System.Int64</ReturnType>
265
266
</ReturnValue>
266
267
<Docs>
267
-
<summary>Gets the index of this GC. GC indices start with 1 and are increased at the beginning of a GC.
268
-
Since the information is updated at the end of a GC, this means you can get the information for a background GC with a smaller index than a foreground GC that finished earlier.</summary>
268
+
<summary>Gets the index of this GC.</summary>
269
269
<value>The index of this GC.</value>
270
-
<remarks>To be added.</remarks>
270
+
<remarks>GC indices start with 1 and are increased at the beginning of a GC.
271
+
Since the information is updated at the end of a GC, this means you can get the information for a background GC with a smaller index than a foreground GC that finished earlier.</remarks>
271
272
</Docs>
272
273
</Member>
273
274
<MemberMemberName="MemoryLoadBytes">
@@ -292,7 +293,8 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but is
292
293
<Docs>
293
294
<summary>Gets the physical memory load when the last garbage collection occurred.</summary>
294
295
<value>The physical memory load, in bytes, when the last garbage collection occurred.</value>
295
-
<remarks>Data is only brought into physical memory on first touch. If you allocated a big object but haven't actually used it, most of its memory isn't in physical memory. In this case, the allocation won't affect the memory load significantly.</remarks>
296
+
<remarks><para>On Windows, memory load is a field in the [MEMORYSTATUS structure](/windows/win32/api/winbase/ns-winbase-memorystatus). It's a number between 0 and 100 that specifies the approximate percentage of physical memory that's in use (0 indicates no memory use and 100 indicates full memory use). Corresponding information is given on other operating systems.</para>
297
+
<para>Data is only brought into physical memory on first touch. If you allocated a big object but haven't actually used it, most of its memory isn't in physical memory. In this case, the allocation won't affect the memory load significantly.</para></remarks>
296
298
</Docs>
297
299
</Member>
298
300
<MemberMemberName="PauseDurations">
@@ -313,9 +315,9 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but is
<summary>Gets the pause durations. For blocking GCs, there is one pause; for background GC, there are two.</summary>
318
+
<summary>Gets the durations of the pauses when all managed threads are suspended.</summary>
317
319
<value>A timespan representing the pause durations.</value>
318
-
<remarks>To be added.</remarks>
320
+
<remarks> For blocking GCs, there is one pause. Pauses for background GC are illustrated at [Background workstation vs. server GC](/dotnet/standard/garbage-collection/background-gc#background-workstation-vs-server-gc).</remarks>
319
321
</Docs>
320
322
</Member>
321
323
<MemberMemberName="PauseTimePercentage">
@@ -384,7 +386,7 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but is
384
386
<Docs>
385
387
<summary>Gets the promoted bytes for this GC.</summary>
386
388
<value>The number of promoted bytes for this GC.</value>
387
-
<remarks>To be added.</remarks>
389
+
<remarks>The promoted bytes represent the objects from the generations that the garbage collection is collecting that survived.</remarks>
388
390
</Docs>
389
391
</Member>
390
392
<MemberMemberName="TotalAvailableMemoryBytes">
@@ -444,7 +446,7 @@ Otherwise, the value of the property is the physical memory on the machine that
444
446
<Docs>
445
447
<summary>Gets the total committed bytes of the managed heap.</summary>
446
448
<value>The total committed bytes of the managed heap.</value>
447
-
<remarks>To be added.</remarks>
449
+
<remarks>The total committed bytes is the amount of backing store for the memory. On Windows, bytes are committed when `VirtualAlloc` is called with `MEM_COMMIT`. On Linux, bytes are committed when the page mapping is changed to <code>PROT_WRITE | PROT_READ</code>.</remarks>
0 commit comments