Table of Contents

Class MemoryWalkResult

Namespace
CStructSharp.Memory
Assembly
CStructSharp.dll

What a bounded traversal visited and why it stopped, with the structured failure when memory was unavailable.

public sealed record MemoryWalkResult : IEquatable<MemoryWalkResult>
Inheritance
MemoryWalkResult
Implements
Inherited Members

Remarks

Nodes lists the regions the walk visited, in order, before it stopped. It is a list of locations, not of decoded records; the callback decides which bytes it reads at each one. In a tree, a node is recorded before its children are requested, so a node whose child lookup failed still appears. Always look at Stop before treating the list as complete: a partial list is useful evidence about a corrupt or truncated image, but it must never silently stand in for a full inventory. Failure is set only for an Unavailable stop.

Constructors

MemoryWalkResult(IReadOnlyList<MemoryRegion>, MemoryWalkStop, MemoryAccessException?)

What a bounded traversal visited and why it stopped, with the structured failure when memory was unavailable.

public MemoryWalkResult(IReadOnlyList<MemoryRegion> Nodes, MemoryWalkStop Stop, MemoryAccessException? Failure = null)

Parameters

Nodes IReadOnlyList<MemoryRegion>

Visited regions in traversal order.

Stop MemoryWalkStop

Why the traversal stopped.

Failure MemoryAccessException

The memory failure that ended the walk, or null for every other stop reason.

Remarks

Nodes lists the regions the walk visited, in order, before it stopped. It is a list of locations, not of decoded records; the callback decides which bytes it reads at each one. In a tree, a node is recorded before its children are requested, so a node whose child lookup failed still appears. Always look at Stop before treating the list as complete: a partial list is useful evidence about a corrupt or truncated image, but it must never silently stand in for a full inventory. Failure is set only for an Unavailable stop.

Properties

Failure

The memory failure that ended the walk, or null for every other stop reason.

public MemoryAccessException? Failure { get; init; }

Property Value

MemoryAccessException

Nodes

Visited regions in traversal order.

public IReadOnlyList<MemoryRegion> Nodes { get; init; }

Property Value

IReadOnlyList<MemoryRegion>

Stop

Why the traversal stopped.

public MemoryWalkStop Stop { get; init; }

Property Value

MemoryWalkStop

Methods

Deconstruct(out IReadOnlyList<MemoryRegion>, out MemoryWalkStop, out MemoryAccessException?)

public void Deconstruct(out IReadOnlyList<MemoryRegion> Nodes, out MemoryWalkStop Stop, out MemoryAccessException? Failure)

Parameters

Nodes IReadOnlyList<MemoryRegion>
Stop MemoryWalkStop
Failure MemoryAccessException

Equals(MemoryWalkResult?)

public bool Equals(MemoryWalkResult? other)

Parameters

other MemoryWalkResult

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(MemoryWalkResult?, MemoryWalkResult?)

public static bool operator ==(MemoryWalkResult? left, MemoryWalkResult? right)

Parameters

left MemoryWalkResult
right MemoryWalkResult

Returns

bool

operator !=(MemoryWalkResult?, MemoryWalkResult?)

public static bool operator !=(MemoryWalkResult? left, MemoryWalkResult? right)

Parameters

left MemoryWalkResult
right MemoryWalkResult

Returns

bool