Module alloc

Source
Expand description

Functions for allocating memory from the runtime.

Structs§

AllocFlags
Flags for allocation functions.

Functions§

twz_rt_dealloc
Deallocate runtime memory pointed to by ptr, with a given layout and flags.
twz_rt_malloc
Allocate runtime memory with the given layout and flags. Returns None on allocation failure.
twz_rt_realloc
Reallocate runtime memory pointed to by ptr, with a given layout and flags, to new_size. The new size can be larger or smaller than the original, and may move while maintaining layout constraints. If the allocation moves, the old memory will be copied over and automatically freed.