Module alloc

Source
Expand description

Support for memory allocation.

Structs§

AllocError
The AllocError error indicates an allocation failure that may be due to resource exhaustion or to something wrong when combining the given input arguments with this allocator.
Fixed
An allocator backed by a fixed storage buffer.
Global
The global memory allocator.
Spill
An allocator which may represent either a fixed allocation or a dynamic allocation with an allocator instance A.
ZeroizingAlloc
An allocator which allocates via A and zeroizes all buffers when they are released.

Traits§

AllocateIn
For all types which are an allocator or reference an allocator, enable their usage as a target for allocation.
Allocator
An implementation of Allocator can allocate, grow, shrink, and deallocate arbitrary blocks of data described via Layout.
AllocatorDefault
A trait implemented by allocators supporting a constant initializer. This cannot use ConstDefault as it is not implemented for the external Global allocator.
AllocatorZeroizes
A marker trait for allocators which zeroize on deallocation.
ConvertAlloc
Convert between types in this crate and standard containers.
SpillAlloc
Attach an allocator to a fixed allocation buffer. Once the initial buffer is exhausted, additional buffer(s) may be requested from the new allocator instance.

Functions§

handle_alloc_error
Signals a memory allocation error.