alloc_observe.producerId
Internal implementation documentation
Defined in alloc_observe.
Allocates a nonzero, monotonically increasing identifier for an allocator producer when observation is enabled, or returns zero in disabled builds.
Source
Source: lib/alloc/observe/src/protocol.zig:523
zig
/// Allocates a nonzero, monotonically increasing identifier for an allocator/// producer when observation is enabled, or returns zero in disabled builds./// Identifiers are allocated independently of active sessions, protected by a/// registry lock that serializes allocation with session floor sampling./// Exhaustion of the identifier space causes a panic rather than a recoverable/// error. Generated values are unique only within the linked module instance,/// providing no global uniqueness across separate processes or independently/// loaded module binaries.pub inline fn producerId() u64 { if (comptime !enabled) return 0; lockProducerRegistry(); defer producer_registry_lock.unlock(); return takeId(&next_producer_id);}Source: lib/alloc/observe/src/root.zig:503
zig
/// Allocates a nonzero, monotonically increasing identifier for an allocator/// producer when observation is enabled, or returns zero in disabled builds./// Identifiers are allocated independently of active sessions, protected by a/// registry lock that serializes allocation with session floor sampling./// Exhaustion of the identifier space causes a panic rather than a recoverable/// error. Generated values are unique only within the linked module instance,/// providing no global uniqueness across separate processes or independently/// loaded module binaries.pub const producerId = protocol.producerId;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |