Skip to documentation
SLOP

alloc_observe.suppress

Reference alloc_observe suppress

Internal implementation documentation

Defined in alloc_observe.

Increments the observation suppression depth counter on the current thread, asserting that depth does not overflow an eight-bit integer, and returns a suppression token that decrements the counter upon deinitialization.

No direct callersNo direct callsalloc_observesuppress
Static calls · unresolved targets: 0 · external targets: 0.

Source

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

zig
/// Increments the observation suppression depth counter on the current thread,/// asserting that depth does not overflow an eight-bit integer, and returns a/// suppression token that decrements the counter upon deinitialization. In/// disabled builds, the call returns an inert token. Active suppression/// prevents the creation of new spans and silent contexts on the calling thread/// without altering spans that are already in progress.pub inline fn suppress() Suppression {    if (comptime !enabled) return .{};    std.debug.assert(callback_depth < std.math.maxInt(u8));    callback_depth += 1;    return .{};}

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

zig
/// Increments the observation suppression depth counter on the current thread,/// asserting that depth does not overflow an eight-bit integer, and returns a/// suppression token that decrements the counter upon deinitialization. In/// disabled builds, the call returns an inert token. Active suppression/// prevents the creation of new spans and silent contexts on the calling thread/// without altering spans that are already in progress.pub const suppress = protocol.suppress;

Audit

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433