fn StackFallbackAllocator(comptime size: usize) type

An allocator that attempts to allocate using a FixedBufferAllocator using an array of size size. If the allocation fails, it will fall back to using fallback_allocator. Easily created with stackFallback.

Parameters

size: usize,

Fields

buffer: [size]u8,
fallback_allocator: Allocator,
fixed_buffer_allocator: FixedBufferAllocator,

Functions

fn get(self: *Self) Allocator

This function both fetches a Allocator interface to this allocator and rese…

This function both fetches a Allocator interface to this allocator and resets the internal buffer allocator.