Table of Contents

Struct MemoryPool<T>.ReportInfo.Node

Namespace
LfrlAnvil.Memory
Assembly
LfrlAnvil.Core.dll

Represents a single MemoryPool<T> node.

public readonly struct MemoryPool<T>.ReportInfo.Node
Inherited Members
Extension Methods

Properties

EndIndex

Index of an element inside the segment, which is also an element one position after the last element of the underlying buffer that belongs to this node.

public int EndIndex { get; }

Property Value

int

IsFragmented

Specifies whether or not this node is fragmented.

public bool IsFragmented { get; }

Property Value

bool

IsSegmentActive

Specifies whether or not the segment to which this node belongs to is active. Active segments contain at least one node, which is either fragmented or in use.

public bool IsSegmentActive { get; }

Property Value

bool

Length

Length of the underlying buffer that belongs to this node.

public int Length { get; }

Property Value

int

SegmentIndex

Index of the segment to which this node belongs to.

public int SegmentIndex { get; }

Property Value

int

SegmentLength

Length of the segment to which this node belongs to.

public int SegmentLength { get; }

Property Value

int

StartIndex

Index of an element inside the segment, which is also the first element of the underlying buffer that belongs to this node.

public int StartIndex { get; }

Property Value

int

Methods

ToString()

Returns a string representation of this MemoryPool<T>.ReportInfo.Node instance.

[Pure]
public override string ToString()

Returns

string

String representation.

TryGetToken()

Attempts to create a new MemoryPoolToken<T> instance from this node.

[Pure]
public MemoryPoolToken<T>? TryGetToken()

Returns

MemoryPoolToken<T>?

New MemoryPoolToken<T> instance, or null when segment is not active or node is fragmented.