allocator

struct Allocator

Members:

  • addr alloc (function pointer: usize sz -> addr address)
  • addr realloc (function pointer: addr address, usize sz -> addr address)
  • addr free (function pointer: addr address)

a_alloc

Parameters: ptr Allocator allocator, usize sz

Returns: addr address

Calls the alloc function on the given allocator, and throws if this method is not implemented

a_realloc

Parameters: ptr Allocator allocator, addr address, usize sz Returns: addr address

Calls the realloc function on the given allocator, and throws if this method is not implemented

a_free

Parameters: ptr Allocator allocator, addr address

Calls the free function on the given allocator, and throws if this method is not implemented

struct HeapAllocator

Inherits from Allocator, is used for allocating on the heap

Only exists if the Heap version is enabled