std.experimental.allocator.building_blocks.fallback_allocator

Members

Functions

fallbackAllocator
FallbackAllocator!(Primary, Fallback) fallbackAllocator(Primary p, Fallback f)

Convenience function that uses type deduction to return the appropriate FallbackAllocator instance. To initialize with allocators that don't have state, use their it static member.

Structs

FallbackAllocator
struct FallbackAllocator(Primary, Fallback)

FallbackAllocator is the allocator equivalent of an "or" operator in algebra. An allocation request is first attempted with the Primary allocator. If that returns null, the request is forwarded to the Fallback allocator. All other requests are dispatched appropriately to one of the two allocators.

Meta