Ejemplo n.º 1
0
 private static void ShowResults(ProcessAllocationInfo allocations)
 {
     Console.WriteLine("  Small   Large         LOH  Type");
     Console.WriteLine("---------------------------------------------------------");
     foreach (var allocation in allocations.GetAllocations().OrderByDescending(a => a.Count))
     {
         var smallCount = (allocation.SmallCount == 0) ? "       " : $"{allocation.SmallCount,7}";
         var largeCount = (allocation.LargeCount == 0) ? "       " : $"{allocation.LargeCount,7}";
         var largeSize  = (allocation.LargeSize == 0) ? "          " : $"{allocation.LargeSize,10}";
         Console.WriteLine($"{smallCount} {largeCount}  {largeSize}  {allocation.TypeName}");
     }
 }