tiny.alloc.interactiveSessionAllocator
Defined in tiny.alloc.
Returns the allocator for storage that stays valid for the session around the call.
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
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |