Skip to content

alloc

Declaration

alloc :: fn (size: usize) *u8

Description

Allocates count of bytes on heap using default allocator. Use free to free allocated memory when it's no longer needed. Cause panic when allocation is not possible. This function use allocator set in _context.alloc_fn

Arguments

  • size Bytes to be allocated.

Result

Pointer to begin of the new allocated block of memory.

Declared in: memory.bl