Expand description
Re-export the allocator2 API for use.
Modules§
- alloc
- Memory allocation APIs
- boxed
- The
Box<T>type for heap allocation. - collections
- vec
- A contiguous growable array type with heap-allocated contents, written
Vec<T>.
Macros§
- unsize_
box - Allows turning a
Box<T: Sized, A>into aBox<U: ?Sized, A>whereTcan be unsizing-coerced into aU. - vec
- Creates a
Veccontaining the arguments.
Structs§
- Alloc
Error - The
AllocErrorerror indicates an allocation failure that may be due to resource exhaustion or to something wrong when combining the given input arguments with this allocator. - Global
- The global memory allocator.
- Layout
- Layout of a block of memory.
- Layout
Error - The
LayoutErroris returned when the parameters given toLayout::from_size_alignor some otherLayoutconstructor do not satisfy its documented constraints. - System
- The default memory allocator provided by the operating system.
Traits§
- Allocator
- An implementation of
Allocatorcan allocate, grow, shrink, and deallocate arbitrary blocks of data described viaLayout. - Global
Alloc - A memory allocator that can be registered as the standard library’s default
through the
#[global_allocator]attribute. - Slice
Ext - Slice methods that use
BoxandVecfrom this crate.
Functions§
- alloc⚠
- Allocates memory with the global allocator.
- alloc_
zeroed ⚠ - Allocates zero-initialized memory with the global allocator.
- dealloc⚠
- Deallocates memory with the global allocator.
- handle_
alloc_ error - Signals a memory allocation error.
- realloc⚠
- Reallocates memory with the global allocator.