Module allocator

Source
Expand description

The allocator module.

The module provides custom memory allocator support traits and utilities based on the unstable feature(allocator_api).

Currently implemented as a reexport of parts of the [allocator_api2].

Modules§

boxed
The Box<T> type for heap allocation.
collections
vec
A contiguous growable array type with heap-allocated contents, written Vec<T>.

Macros§

vec
Creates a Vec containing the arguments.

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.
Global
The global memory allocator.

Traits§

Allocator
An implementation of Allocator can allocate, grow, shrink, and deallocate arbitrary blocks of data described via Layout.
TryCloneIn
Explicitly duplicate an object using the specified Allocator.

Functions§

allocate
Moves value to the memory backed by alloc and returns a pointer.