Alloc

Signatures

u64 alloc(u64 size)
u64 alloc(u64 size, bool clear)

Description

Allocates memory from the main pool, always aligned to the nearest 16 bytes.

Returns the starting address to the allocated memory, or 0 if allocation fails.

Arguments

Size

The amount of memory to allocate, in bytes.

Clear

If set to true, the memory will be cleared. If set to false, the memory will remain uninitialized.

Is optional and set to true by default.

Notes

The memory that can be allocated is virtually unlimited, constrained only by the total amount of system RAM.

Last updated