/// <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)) { }
/// <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)) { }
public DirectTrackingAllocator(int blockSize, Counter bytesUsed) : base(blockSize) { this.bytesUsed = bytesUsed; }
public DirectTrackingAllocator(Counter bytesUsed) : this(BYTE_BLOCK_SIZE, bytesUsed) { }
/// <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)) { }
public DirectBytesStartArray(int initSize) : this(initSize, Counter.NewCounter()) { }
public DirectBytesStartArray(int initSize, Counter counter) { this.bytesUsed = counter; this.m_initSize = initSize; }