public PerCoreLockedStacks() { LockedStack[] stacks = new LockedStack[System.Math.Min(Environment.ProcessorCount, MaxPerCorePerArraySizeStacks)]; for (int i = 0; i < stacks.Length; i++) { stacks[i] = new LockedStack(); } _perCoreStacks = stacks; }
/// <summary>Initializes the stacks.</summary> public PerCoreLockedStacks() { // Create the stacks. We create as many as there are processors, limited by our max. var stacks = new LockedStack[Math.Min(Environment.ProcessorCount, MaxPerCorePerArraySizeStacks)]; for (int i = 0; i < stacks.Length; i++) { stacks[i] = new LockedStack(); } _perCoreStacks = stacks; }
/// <summary>Initializes the stacks.</summary> public PerCoreLockedStacks() { // Create the stacks. We create as many as there are processors, limited by our max. var stacks = new LockedStack[s_lockedStackCount]; for (int i = 0; i < stacks.Length; i++) { stacks[i] = new LockedStack(); } _perCoreStacks = stacks; }