Estimated bytes on heap : Garbage Collection « Development Class « C# / C Sharp
- C# / C Sharp
- Development Class
- Garbage Collection
Estimated bytes on heap
using System;
using System.Collections.Generic;
using System.Text;
class Program {
static void Main(string[] args) {
Console.WriteLine("Estimated bytes on heap: {0}", GC.GetTotalMemory(false));
Console.WriteLine("This OS has {0} object generations.\n", (GC.MaxGeneration + 1));
}
}
Related examples in the same category