Arrays
Defining a new array
Finding out how much memory we need
Allocating the memory
extern func malloc(size: i64): *i8;package main;
extern func malloc(size: i64): *i8;
func main() {
var mem: *i8 = malloc(10 * 8); // 10 x 8 bytes
}Casting the allocated memory to the correct data type
Accessing elements in the array
Last updated