Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
GC.GetTotalAllocatedBytes(Boolean) Method
Definition
- Namespace:
- System
- Assemblies:
- netstandard.dll, System.Runtime.dll
- Assembly:
- System.Runtime.dll
- Source:
- GC.CoreCLR.cs
- Source:
- GC.CoreCLR.cs
- Source:
- GC.cs
- Source:
- GC.cs
- Source:
- GC.CoreCLR.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a count of the bytes allocated over the lifetime of the process. The returned value does not include any native allocations.
public static long GetTotalAllocatedBytes(bool precise = false);
static member GetTotalAllocatedBytes : bool -> int64
Public Shared Function GetTotalAllocatedBytes (Optional precise As Boolean = false) As Long
Parameters
- precise
- Boolean
If true, gather a precise number; otherwise, gather an approximate count. Gathering a precise value entails a significant performance penalty.
Returns
The total number of bytes allocated over the lifetime of the process.
Applies to
Feedback
Was this page helpful?
