Show / Hide Table of Contents

Delegate MemoryAllocator<T>

Represents memory allocator.

Namespace: DotNext.Buffers
Assembly: DotNext.dll
Syntax
public delegate MemoryOwner<T> MemoryAllocator<T>(int length)
Parameters
Type Name Description
int length

The number of items in the rented memory.

Returns
Type Description
MemoryOwner<T>

The rented memory.

Type Parameters
Name Description
T

The type of the items in the memory pool.

Constructors

View Source

MemoryAllocator(object, nint)

Declaration
public MemoryAllocator(object @object, nint method)
Parameters
Type Name Description
object object
nint method

Methods

View Source

BeginInvoke(int, AsyncCallback, object)

Declaration
public virtual IAsyncResult BeginInvoke(int length, AsyncCallback callback, object @object)
Parameters
Type Name Description
int length
AsyncCallback callback
object object
Returns
Type Description
IAsyncResult
View Source

EndInvoke(IAsyncResult)

Declaration
public virtual MemoryOwner<T> EndInvoke(IAsyncResult result)
Parameters
Type Name Description
IAsyncResult result
Returns
Type Description
MemoryOwner<T>
View Source

Invoke(int)

Declaration
public virtual MemoryOwner<T> Invoke(int length)
Parameters
Type Name Description
int length
Returns
Type Description
MemoryOwner<T>

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
Memory.AllocateAtLeast<T>(MemoryAllocator<T>, int)
Memory.AllocateExactly<T>(MemoryAllocator<T>, int)
DelegateHelpers.ChangeType<TDelegate>(Delegate)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾