Skip to documentation
SLOP

alloc_observe.Outcome

Reference alloc_observe Outcome

Internal implementation documentation

Defined in alloc_observe.

An Outcome carries the result of an operation as supplied by the producer.

API (2)

Fields and members

Public fields and members.

No direct callersNo direct callsalloc_observeOutcome
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/alloc/observe/src/protocol.zig:138

zig
/// An `Outcome` carries the result of an operation as supplied by the producer./// It contains a boolean succeeded flag and a usize address that defaults to/// zero. This value represents an operation-specific result rather than a/// simple return without an exception, and it provides no proof of physical/// reclamation. Within the generic `ObservedAllocator`, a successful allocation/// or remap produces the resulting address, a successful resize produces the/// old address, a deallocation produces the old address, and an operation/// failure produces zero. A caller invoking a lifecycle span may omit the/// address so that it defaults to zero, but the protocol does not enforce that/// a lifecycle result address must be zero. The `beginLifecycle` function/// zeroes the old address and length metadata when opening the span, while/// finish accepts the address supplied in the final Outcome.pub const Outcome = struct {    address: usize = 0,    succeeded: bool,};

Source: lib/alloc/observe/src/root.zig:397

zig
/// An `Outcome` carries the result of an operation as supplied by the producer./// It contains a boolean succeeded flag and a usize address that defaults to/// zero. This value represents an operation-specific result rather than a/// simple return without an exception, and it provides no proof of physical/// reclamation. Within the generic `ObservedAllocator`, a successful allocation/// or remap produces the resulting address, a successful resize produces the/// old address, a deallocation produces the old address, and an operation/// failure produces zero. A caller invoking a lifecycle span may omit the/// address so that it defaults to zero, but the protocol does not enforce that/// a lifecycle result address must be zero. The `beginLifecycle` function/// zeroes the old address and length metadata when opening the span, while/// finish accepts the address supplied in the final Outcome.pub const Outcome = protocol.Outcome;

Audit

Definitions1
Public names1
Members2
Version26.7.0
Revisiondaab053ee433