Skip to documentation
SLOP

tiny.alloc.interactiveSessionAllocator

Reference tiny.alloc interactiveSessionAllocator

Defined in tiny.alloc.

Returns the allocator for storage that stays valid for the session around the call.

Called byCallstest sourcelib.alloc.src.testtest: allocator policy separates fast...tiny.allocdiagnosticAllocatorConfigprivate sourcelib.alloc.src.policyplatformProcessAllocatorprivate sourcelib.alloc.src.policytestAllocatorForModetiny.allocinteractiveSessionAllocator
Static calls · unresolved targets: 0 · external targets: 1.

Source

Source: lib/alloc/src/policy.zig:30

zig
/// Returns the allocator for storage that stays valid for the session around/// the call. Memory taken from it goes back through the same allocator. It uses/// the `fallback` the caller passes in two cases: a test build running the/// leak-checking policy, and a WebAssembly target. Everywhere else it returns/// the process allocator.pub fn interactiveSessionAllocator(fallback: Allocator) Allocator {    if (comptime builtin.is_test) return testAllocatorForMode(fallback);    if (comptime diagnostics.config() != null) return platformProcessAllocator();    if (comptime builtin.cpu.arch.isWasm()) return fallback;    return platformProcessAllocator();}

Source: lib/alloc/src/root.zig:49

zig
pub const interactiveSessionAllocator = policy.interactiveSessionAllocator;

Audit

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433