std::core::mem::allocator

Public

Types

NameDescription
AllocInitType
SimpleHeapAllocatorThe SimpleHeapAllocator implements a simple heap allocator on top of an allocator function....
TrackingAllocator
OnStackAllocatorThe OnStackAllocator is similar to the ArenaAllocator: it allocates from a chunk of memory...
AlignedBlock
TempAllocator
TempAllocatorPage
VmemOptions
WasmMemory
OnStackAllocatorHeader
Vmem
DynamicArenaAllocatorThe dynamic arena allocator is an arena allocator that can grow by adding additional arena "pages"....
Allocation
TrackingEnv
BackedArenaAllocatorThe backed arena allocator provides an allocator that will allocate from a pre-allocated chunk of memory...
ArenaAllocator

Functions

NameDescription
allocator::new_array
allocator::release
allocator::fprint_report
allocator::derive_allocator
allocator::realloc
allocator::malloc_aligned
allocator::mark"Mark" the current state of the arena allocator by returning the use count.
allocator::clone_alignedClone overaligned values. Must be released using free_aligned.
allocator::@aligned_alloc
allocator::free_aligned
allocator::calloc_aligned
allocator::is_aligned
allocator::clone_any
allocator::new_backed_allocator
allocator::total_allocation_count
allocator::pagesize
allocator::pop_pool
allocator::allocation_count
allocator::new_alignedAllocate using an aligned allocation. This is necessary for types with a default memory alignment...
allocator::allocate_block
allocator::free
allocator::new
allocator::new_temp_allocator
allocator::acquire
allocator::new_array_alignedAllocate using an aligned allocation. This is necessary for types with a default memory alignment...
allocator::new_try
allocator::@aligned_realloc
allocator::clone_slice
allocator::print_report
allocator::new_array_try
allocator::total_allocated
allocator::malloc_try
allocator::temp
allocator::allocated
allocator::alignment_for_allocation
allocator::calloc_try
allocator::alloc_with_padding
allocator::resetReset the entire temp allocator, which will merge all the children into it.
allocator::alloc_array
allocator::alloc_array_alignedAllocate using an aligned allocation. This is necessary for types with a default memory alignment...
allocator::new_with_padding
allocator::destroy
allocator::realloc_aligned
allocator::has_leaks
allocator::heap
allocator::calloc
allocator::owns_pointer
allocator::clearReset the usage completely.
allocator::realloc_try
allocator::@aligned_free
allocator::push_pool
allocator::init
allocator::alloc_try
allocator::malloc
allocator::alloc_array_try
allocator::resize
allocator::cloneClone a value.
allocator::alloc
allocator::alloc_alignedAllocate using an aligned allocation. This is necessary for types with a default memory alignment...
allocator::destroy_temp_allocatorsCall this to destroy any memory used by the temp allocators. This will invalidate all temp memory.
allocator::allocations_tlist
allocator::wrapGiven some memory, create an arena allocator on the stack for it.

Globals

NameDescription
LIBC_ALLOCATOR
auto_create_temp
temp_allocator_default_options
WASM_BLOCK_SIZE
top_temp
MAX_BACKTRACE
temp_allocator_realloc_size
wasm_memory
current_temp
DEFAULT_SIZE_PREFIX_ALIGNMENT
temp_allocator_min_size
temp_allocator_reserve_size
DEFAULT_SIZE_PREFIX
NULL_ALLOCATOR

Private

Functions

NameDescription
allocator::create_temp_allocator
allocator::base_allocator
allocator::create_temp_allocator_on_demand

Globals

NameDescription
temp_base_allocator
thread_allocator
LAZY_TEMP