Skip to content

stdlib/allocView source ↗

alloc

4 items · generated by scribe fromstdlib/alloc.fd· synced 2026-11-15

stdlib/alloc4 items

Contents

__alloc

Allocate size bytes on the heap. Returns a raw pointer (i64). The memory is uninitialized. Returns 0 on failure.

pub fn __alloc(size: i64) -> i64 {

Parameters:

  • size: i64

Returns: i64

Defined at line 12


__free

Free a previously allocated pointer. Passing 0 (null) is a no-op.

pub fn __free(ptr: i64) -> void {

Parameters:

  • ptr: i64

Returns: void

Defined at line 18


__alloc_bytes

Allocate size bytes (alias for __alloc).

pub fn __alloc_bytes(size: i64) -> i64 {

Parameters:

  • size: i64

Returns: i64

Defined at line 23


__alloc_array

Allocate count elements of elem_size bytes each. Total allocation = count * elem_size. Returns a raw pointer.

pub fn __alloc_array(count: i64, elem_size: i64) -> i64 {

Parameters:

  • count: i64
  • elem_size: i64

Returns: i64

Defined at line 29


Generated by scribe, the Fides documentation generator