メインコンテンツまでスキップ

Class Memory

Represents an instance of a linear memory.

Assembly: WaaS.Core.dll​
View Source​
Declaration
public class Memory : IDisposable, IExternal

Implements:
System.IDisposable, WaaS.Runtime.IExternal

Properties​

PageLimits​

View Source​
Declaration
public Limits PageLimits { get; }

Span​

View Source​
Declaration
public Span<byte> Span { get; }

Length​

View Source​
Declaration
public int Length { get; }

NumPages​

View Source​
Declaration
public int NumPages { get; }

Fields​

PageSizeRank​

View Source​
Declaration
public const int PageSizeRank = 16

MaxNumPages​

The maximum number of pages that WaaS can allocate, which is limited by the length of arrays.

View Source​
Declaration
public const int MaxNumPages = 32767

Methods​

Dispose()​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source​
Declaration
public void Dispose()

AsMemory()​

View Source​
Declaration
public Memory<byte> AsMemory()
Returns​

System.Memory<System.Byte>

~Memory()​

View Source​
Declaration
protected ~Memory()

TryGrow(int)​

View Source​
Declaration
public bool TryGrow(int numPagesToGrow)
Returns​

System.Boolean

Parameters​
TypeName
System.Int32numPagesToGrow

TryGrow(int, uint?)​

View Source​
Declaration
public bool TryGrow(int numPagesToGrow, uint? maxNumPages)
Returns​

System.Boolean

Parameters​
TypeNameDescription
System.Int32numPagesToGrow
System.Nullable<System.UInt32>maxNumPagesAn additional limit on the number of pages imposed by the host.

Implements​