C# Class NLight.Diagnostics.MemoryPressureManager

Manages the garbage collector memory pressure. See GC.AddMemoryPressure(long) and GC.RemoveMemoryPressure(long).
Show file Open project: slorion/nlight

Public Methods

Method Description
AddMemoryPressure ( long bytesAllocated ) : void

Informs the runtime of a large allocation of unmanaged memory that should be taken into account when scheduling garbage collection.

RemoveMemoryPressure ( long bytesAllocated ) : void

Informs the runtime that unmanaged memory has been released and no longer needs to be taken into account when scheduling garbage collection.

Private Methods

Method Description
PressureCheck ( ) : void

Method Details

AddMemoryPressure() public static method

Informs the runtime of a large allocation of unmanaged memory that should be taken into account when scheduling garbage collection.
public static AddMemoryPressure ( long bytesAllocated ) : void
bytesAllocated long The incremental amount of unmanaged memory that has been allocated.
return void

RemoveMemoryPressure() public static method

Informs the runtime that unmanaged memory has been released and no longer needs to be taken into account when scheduling garbage collection.
public static RemoveMemoryPressure ( long bytesAllocated ) : void
bytesAllocated long The amount of unmanaged memory that has been released.
return void