public ThreadLocalMessageBufferPool(int maxsize) { stacks = new Stack <T[]>(); this.id = this.GetHashCode(); this.typesize = ObjectSize.ManagedSize(typeof(T)); }
public LockedBufferPool(int maxsize) { stacks = new Stack <T[]> [maxsize + 1]; for (int i = 0; i < stacks.Length; i++) { stacks[i] = new Stack <T[]>(1); } this.id = this.GetHashCode(); this.typesize = ObjectSize.ManagedSize(typeof(T)); }