Skip to documentation
SLOP

alloc_phase.ViolationSites

Reference alloc_phase ViolationSites

Internal implementation documentation

Defined in alloc_phase.

Represents an owned by-value snapshot of up to 16 distinct nonzero return addresses captured during phase violations.

API (3)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

Source: lib/alloc/phase/src/allocator.zig:316

zig
/// Represents an owned by-value snapshot of up to 16 distinct nonzero return/// addresses captured during phase violations. The structure holds raw return/// addresses and an active count without resolving symbols, capturing full/// stack traces, or recording per-site occurrence counts. Because concurrent/// threads race to register unrecorded sites into fixed slots, the retained set/// reflects arrival order rather than a complete or ordered execution trace./// `SealedPhaseAllocator` maintains no site storage and always returns an empty/// snapshot.pub const ViolationSites = struct {    addresses: [violation_site_capacity]usize = @splat(0),    count: u8 = 0,    /// Borrows the populated prefix `addresses[0..count]` from this snapshot as    /// a slice of addresses. The returned slice directly references the memory    /// of this `ViolationSites` instance rather than the guard control block,    /// so the caller must keep the snapshot alive and unmoved while using the    /// slice.    pub fn slice(self: *const ViolationSites) []const usize {        return self.addresses[0..self.count];    }};

Source: lib/alloc/phase/src/root.zig:178

zig
/// Represents an owned by-value snapshot of up to 16 distinct nonzero return/// addresses captured during phase violations. The structure holds raw return/// addresses and an active count without resolving symbols, capturing full/// stack traces, or recording per-site occurrence counts. Because concurrent/// threads race to register unrecorded sites into fixed slots, the retained set/// reflects arrival order rather than a complete or ordered execution trace./// `SealedPhaseAllocator` maintains no site storage and always returns an empty/// snapshot.pub const ViolationSites = allocator.ViolationSites;

Audit

Definitions2
Public names2
Members2
Version26.7.0
Revisiondaab053ee433