Retrieves the number of bytes currently thought to be allocated. A parameter indicates whether this method can wait a short interval before returning, to allow the system to collect garbage and finalize objects.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static long GetTotalMemory(
bool forceFullCollection
)
Parameters
- forceFullCollection
- Type: SystemBoolean
true to indicate that this method can wait for garbage collection to occur before returning; otherwise, false.
Return Value
Type:
Int64A number that is the best available approximation of the number of bytes currently allocated in managed memory.
See Also