ISliceAllocator

Namespace: SnowBank.Buffers · interface

Implements: IDisposable

Allocator that slices of bytes

Properties

TotalAllocated

long TotalAllocated { get; }

Returns the total amount of bytes that were allocated by this instance

Methods

Allocate

ArraySegment<byte> Allocate(int size)

Returns a ArraySegment to write to that is exactly the requested size (specified by size) and advance the cursor.

  • size — The exact length of the returned Slice. If 0, a non-empty buffer is returned.

Returns: A ArraySegment of at exactly the size requested...