Edit

Share via


GCLargeObjectHeapCompactionMode Enum

Definition

Indicates whether the next blocking garbage collection compacts the large object heap (LOH).

C#
public enum GCLargeObjectHeapCompactionMode
C#
[System.Serializable]
public enum GCLargeObjectHeapCompactionMode
Inheritance
GCLargeObjectHeapCompactionMode
Attributes

Fields

Name Value Description
Default 1

The large object heap (LOH) is not compacted.

CompactOnce 2

The large object heap (LOH) will be compacted during the next blocking generation 2 garbage collection.

Remarks

The value of the GCSettings.LargeObjectHeapCompactionMode property is a member of the GCLargeObjectHeapCompactionMode enumeration that indicates whether the next full blocking garbage collection also compacts the large object heap (LOH). By default, the LOH is not compacted. A value of CompactOnce indicates that the blocking garbage collection will compact the LOH. After the garbage collection, the value of the GCSettings.LargeObjectHeapCompactionMode property reverts to Default.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1
UWP 10.0

See also