Exemple #1
0
        public PooledElasticCircularBuffer()
        {
            this.pool = MemoryManager.GetColumnPool <T>(Capacity + 1);
            var node = new LinkedListNode <PooledCircularBuffer <T> >(new PooledCircularBuffer <T>(Capacity, this.pool));

            this.buffers.AddFirst(node);
            this.tail  = this.head = node;
            this.Count = 0;
        }
Exemple #2
0
 public MemoryPool(bool isColumnar = true)
 {
     this.IsColumnar     = isColumnar;
     this.longPool       = MemoryManager.GetColumnPool <long>();
     this.keyPool        = MemoryManager.GetColumnPool <TKey>();
     this.payloadPool    = MemoryManager.GetColumnPool <TPayload>();
     this.intPool        = MemoryManager.GetColumnPool <int>();
     this.shortPool      = MemoryManager.GetColumnPool <short>();
     this.bytePool       = MemoryManager.GetColumnPool <byte>();
     this.stringPool     = MemoryManager.GetColumnPool <string>();
     this.bitvectorPool  = MemoryManager.GetBVPool(1 + (Config.DataBatchSize >> 6));
     this.eventBatchPool = MemoryManager.GetStreamMessagePool(this, this.IsColumnar);
     this.charArrayPool  = MemoryManager.GetCharArrayPool();
 }
Exemple #3
0
 public PooledCircularBuffer(int capacity, ColumnPool <T> pool)
 {
     this.DefaultCapacity = capacity;
     pool.Get(out this.Items);
     this.Items.UsedLength = capacity + 1;
 }