Exemple #1
0
 public SlabDispenser(int slots, int size)
 {
     Length   = size;
     _pool    = new SlabPool(slots, size);
     _buffers = new Stack <ByteBufferSlab>();
     for (int i = 0; i < slots; i++)
     {
         _buffers.Push(new ByteBufferSlab(_pool.GetPointer(i), this));
     }
 }
Exemple #2
0
 public SlabDispenser(int slots, int size)
 {
     Length = size;
     _pool = new SlabPool(slots, size);
     _buffers = new Stack<ByteBufferSlab>();
     for (int i = 0; i < slots; i++)
     {
         _buffers.Push(new ByteBufferSlab(_pool.GetPointer(i), this));
     }
 }