Export (0) Print
Expand All

GCLatencyMode Enumeration

Adjusts the time that the garbage collector intrudes in your application.

Namespace:  System.Runtime
Assembly:  mscorlib (in mscorlib.dll)

[SerializableAttribute]
public enum GCLatencyMode

Member nameDescription
BatchDisables garbage collection concurrency and reclaims objects in a batch call. This is the most intrusive mode.

This mode is designed for maximum throughput at the expense of responsiveness. 

This mode overrides the <gcConcurrent> runtime configuration setting. If <gcConcurrent> is enabled, switching to Batch mode prevents any further concurrent collections.

This is the only valid mode for the server garbage collector. It is equivalent to garbage collection on a workstation that is not concurrent.

InteractiveEnables garbage collection concurrency and reclaims objects while the application is running. This is the default mode for garbage collection on a workstation and is less intrusive. It balances responsiveness with throughput.

This mode is equivalent to garbage collection on a workstation that is concurrent. It is not available on the server garbage collector.

LowLatencyEnables garbage collection that is more conservative in reclaiming objects. Full Collections occur only if the system is under memory pressure while generation 0 and generation 1 collections might occur more frequently. This is the least intrusive mode.

This mode is not available on the server garbage collector.

You can adjust the intrusiveness of garbage collection in your application by setting the LatencyMode property to a value in this enumeration.

See Latency Modes for a discussion of how the runtime configuration settings for garbage collection affect the default value for this enumeration.

.NET Framework

Supported in: 4, 3.5 SP1, 3.0 SP1, 2.0 SP1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft