Skip to content

std::Memory Namespace

std::Memory

Memory management utilities and operations for the Helix language

Functions

address_type

Returns the type of memory address for a pointer

new_aligned<T>

Allocates memory for a type with specified alignment (alignment of T) and arguments

delete_aligned<T>

Deallocates memory for a type allocated with new_aligned

as_reference<T>

Converts a pointer to an lvalue reference type

as_pointer<T>

Converts a reference to a pointer type

exchange<T>

Atomically exchanges the value at the pointer with the specified value, returns the old value

forward<T>

Forwards a value as an rvalue reference, used for perfect forwarding in function templates

heap_start

Returns the start address of the heap memory region

copy

Copies memory from source to destination

move

Moves memory from source to destination

set

Sets a block of memory to a specified value

find<T>

Finds the first occurrence of a value in a block of memory

compare

Compares two blocks of memory for equality

in_rotdata

Checks if a pointer is in the ROTData memory region

stack_size

Returns the size of the stack memory region

stack_start

Returns the start address of the stack memory region

stack_bounds

Returns the bounds of the stack memory region as a pair of pointers

in_stack

Checks if a pointer is in the stack memory region