Esempio n. 1
0
        internal void Get(ref PoolBufferFull buffer)
        {
            Get(ref buffer.PoolBuffer);
            uint index = buffer.PoolBuffer.Index;

            buffer.Set(Buffers[(int)(index >> arrayBits)], (int)(index & ArrayIndexMark) << sizeBits);
        }
Esempio n. 2
0
        internal static void GetBuffer(ref PoolBufferFull buffer, int size)
        {
            Pool pool = GetPool(size);

            if (pool == null)
            {
                buffer.Set(new byte[size], 0);
            }
            else
            {
                pool.Get(ref buffer);
            }
        }