GCMemoryInfo.MemoryLoadBytes Property

Definition

Gets the physical memory load when the last garbage collection occurred.

public:
 property long MemoryLoadBytes { long get(); };
public long MemoryLoadBytes { get; }
member this.MemoryLoadBytes : int64
Public ReadOnly Property MemoryLoadBytes As Long

Property Value

The physical memory load, in bytes, when the last garbage collection occurred.

Remarks

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.

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.

Applies to