AdvancedMultithreadingLab.MiscBenchmarks.TestAlloc C# (CSharp) Method

TestAlloc() private static method

private static TestAlloc ( string name ) : void
name string
return void
        private static void TestAlloc(string name)
        {
            const int n = 1000000000;

            Stopwatch stopwatch = Stopwatch.StartNew();
            for (int i = 0; i < n; i++)
            {
                new AllocClass();
            }
            GC.WaitForFullGCComplete();
            stopwatch.Stop();

            WriteTime(name, n, stopwatch.ElapsedTicks);
        }