Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​GCMemoryInfo

Assembly: System.Runtime

Provides a set of APIs that can be used to retrieve garbage collection information.

Properties

public bool
Compacted
Gets a value that indicates if this is a compacting GC or not.
public bool
Concurrent
Gets a value that indicates if this is a concurrent GC (background GC) or not.
public long
FinalizationPendingCount
Gets the number of objects that are ready for finalization that this GC observed.
public long
FragmentedBytes
Gets the total fragmentation when the last garbage collection occurred.
public int
Generation
Gets the generation this GC collected. Collecting a generation also collects younger generations.
GenerationInfo
Gets the generation information for all generations.
public long
HeapSizeBytes
Gets the total heap size when the last garbage collection occurred.
public long
HighMemoryLoadThresholdBytes
Gets the high memory load threshold when the last garbage collection occurred.
public long
Index
Gets the index of this GC.
public long
MemoryLoadBytes
Gets the physical memory load when the last garbage collection occurred.
PauseDurations
Gets the durations of the pauses when all managed threads are suspended.
public double
PauseTimePercentage
Gets the pause time percentage in the GC so far. If the pause time is 1.2%, this property's value is 1.2. The value is calculated by taking the sum of all GC pauses so far and dividing that by the total elapsed time of the process since the runtime was loaded. This running counter is updated at the end of each GC. It does not distinguish between <see cref="T:System.GCKind" /> . That is, at every GC, the calculated value is updated, and when you access this property, it gets the latest calculated value.
public long
PinnedObjectsCount
Gets the number of pinned objects this GC observed.
public long
PromotedBytes
Gets the promoted bytes for this GC.
public long
TotalAvailableMemoryBytes
Gets the total available memory for the garbage collector to use when the last garbage collection occurred.
public long
TotalCommittedBytes
Gets the total committed bytes of the managed heap.

Methods

public bool
Equals​(object obj)
Inherited from ValueType
obj The object to compare with the current instance.
Returns <see langword="true" /> if <paramref name="obj" /> and this instance are the same type and represent the same value; otherwise, <see langword="false" /> .
Indicates whether this instance and a specified object are equal.
public int
GetHashCode​()
Inherited from ValueType
Returns A 32-bit signed integer that is the hash code for this instance.
Returns the hash code for this instance.
public string
ToString​()
Inherited from ValueType
Returns The fully qualified type name.
Returns the fully qualified type name of this instance.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .