Makes allocator the context.allocator until the end of the enclosing scope, then puts the old one back.
push_allocator :: (allocator: Allocator)
Parameters
- allocator: Allocator
{
push_allocator(temp);
text := sprint("%", 123); // lives in temporary storage
assert(text == "123");
}
reset_temporary_storage();push_allocator :: (proc: Allocator_Proc, data: *void)
Makes Allocator.{proc, data} the context.allocator until the end of the enclosing scope.
Parameters
- proc: Allocator_Proc
- the allocator procedure.
- data: *void
- handed to
procon every call.