Beispiel #1
0
 /// <summary>
 /// Creates a new <see cref="RecyclingInt32BlockAllocator"/>.
 /// </summary>
 /// <param name="blockSize">
 ///          The size of each block returned by this allocator. </param>
 /// <param name="maxBufferedBlocks">
 ///          Maximum number of buffered int blocks. </param>
 public RecyclingInt32BlockAllocator(int blockSize, int maxBufferedBlocks)
     : this(blockSize, maxBufferedBlocks, Counter.NewCounter(false))
 {
 }
Beispiel #2
0
 /// <summary>
 /// Creates a new <see cref="RecyclingInt32BlockAllocator"/> with a block size of
 /// <see cref="Int32BlockPool.INT32_BLOCK_SIZE"/>, upper buffered docs limit of
 /// <see cref="DEFAULT_BUFFERED_BLOCKS"/>.
 /// </summary>
 public RecyclingInt32BlockAllocator()
     : this(Int32BlockPool.INT32_BLOCK_SIZE, 64, Counter.NewCounter(false))
 {
 }
Beispiel #3
0
 public DirectTrackingAllocator(int blockSize, Counter bytesUsed)
     : base(blockSize)
 {
     this.bytesUsed = bytesUsed;
 }
Beispiel #4
0
 public DirectTrackingAllocator(Counter bytesUsed)
     : this(BYTE_BLOCK_SIZE, bytesUsed)
 {
 }
Beispiel #5
0
 /// <summary>
 /// Creates a new <see cref="RecyclingByteBlockAllocator"/> with a block size of
 /// <see cref="ByteBlockPool.BYTE_BLOCK_SIZE"/>, upper buffered docs limit of
 /// <see cref="DEFAULT_BUFFERED_BLOCKS"/> (64).
 /// </summary>
 public RecyclingByteBlockAllocator()
     : this(ByteBlockPool.BYTE_BLOCK_SIZE, 64, Counter.NewCounter(false))
 {
 }
Beispiel #6
0
 public DirectBytesStartArray(int initSize)
     : this(initSize, Counter.NewCounter())
 {
 }
Beispiel #7
0
 public DirectBytesStartArray(int initSize, Counter counter)
 {
     this.bytesUsed  = counter;
     this.m_initSize = initSize;
 }