The OpenD Programming Language

FallbackAllocator.reallocate

reallocate works as follows. If primary.owns(b), then primary.reallocate(b, newSize) is attempted. If it fails, an attempt is made to move the allocation from primary to fallback.

If primary does not own b, then fallback.reallocate(b, newSize) is attempted. If that fails, an attempt is made to move the allocation from fallback to primary.

struct FallbackAllocator(Primary, Fallback)
static if(hasMember!(Primary, "owns"))
bool
reallocate
(
ref void[] b
,
size_t newSize
)

Meta