Property | Type | Description | |
---|---|---|---|
GetFilledBuffer | IBuffer | ||
GetSingleSlabPool | bool | ||
SetSingleSlabPool | void | ||
TryAllocateBlocksInSlabs | long | ||
TryFreeSlabs | void |
Method | Description | |
---|---|---|
BufferPool ( long slabSize, int initialSlabs, int subsequentSlabs ) : System |
Initializes a new instance of the BufferPool class
|
|
GetBuffer ( long size ) : IBuffer |
Creates a buffer of the specified size
|
|
GetBuffer ( long size, byte filledWith ) : IBuffer |
Creates a buffer of the specified size, filled with the contents of a specified byte array
|
Method | Description | |
---|---|---|
GetFilledBuffer ( IList |
Helper method that gets a filled buffer constructed from a list of memory blocks
|
|
GetSingleSlabPool ( ) : bool | ||
SetSingleSlabPool ( bool value ) : void | ||
TryAllocateBlocksInSlabs ( long totalLength, int maxBlocks, IMemorySlab slabs, List |
Helper method that searches for free blocks in an array of slabs and returns allocated blocks
|
|
TryFreeSlabs ( ) : void |
Searches for empty slabs and frees one if there are more than InitialSlabs number of slabs.
|
public BufferPool ( long slabSize, int initialSlabs, int subsequentSlabs ) : System | ||
slabSize | long | Length, in bytes, of a slab in the BufferPool |
initialSlabs | int | Number of slabs to create initially |
subsequentSlabs | int | Number of additional slabs to create at a time |
return | System |
public GetBuffer ( long size ) : IBuffer | ||
size | long | Buffer size, in bytes |
return | IBuffer |
public GetBuffer ( long size, byte filledWith ) : IBuffer | ||
size | long | Buffer size, in bytes |
filledWith | byte | Byte array to copy to buffer |
return | IBuffer |