Skip to main content

Module memory

Module memory 

Source
Expand description

Memory management callbacks for FFI operators

Provides arena-based memory allocation for FFI operators with fallback to system allocator.

Functionsยง

clear_current_arena
Clear the current arena for this thread
host_alloc
Allocate memory from the current arena or system allocator
host_free
Free memory (no-op for arena memory, system free otherwise)
host_realloc
Reallocate memory (allocates new for arena, uses system realloc otherwise)
set_current_arena
Set the current arena for this thread