Table of Contents

Enum MemoryFailure

Namespace
CStructSharp.Memory
Assembly
CStructSharp.dll

The stable categories of MemoryAccessException.

public enum MemoryFailure

Fields

BudgetExceeded = 2

The operation's byte, request, or depth limit was reached, or an overlay's changed-byte capacity was exceeded.

InvalidValue = 5

An addressed operation cannot use the value it found, such as following a null pointer.

MissingBytes = 1

A backing source returned zero bytes before the requested range was complete, for example a truncated file.

SourceFailure = 4

A transport or backing store failed, or an adapter returned an invalid byte count.

StaleSource = 3

A source's generation or bytes differ from the state a patch or cache expected.

Unmapped = 0

No mapping covers the requested address, or a write falls outside the source's extent.

Remarks

An analyzer uses the category to decide what to do next: show a partial result, raise an explicit work limit, discard a stale edit, or report a transport problem. Missing data is never represented as an implicit zero value. BudgetExceeded is reported with the core code ReadLimitExceeded and every other category with ReadFailed. Argument errors, path errors, value-encoding errors, schema and metadata errors, and cooperative cancellation use other exception types and therefore have no category here.