示例#1
0
        public ThreadLocalMessageBufferPool(int maxsize)
        {
            stacks = new Stack <T[]>();

            this.id       = this.GetHashCode();
            this.typesize = ObjectSize.ManagedSize(typeof(T));
        }
示例#2
0
文件: BufferPool.cs 项目: omidm/naiad
        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));
        }