1 unstable release

new 0.1.0 Dec 19, 2024

#235 in Memory management

MIT/Apache

38KB
644 lines

untyped-box

A Box<T> represents a heap allocation of a value of type T. This crate provides an untyped heap allocation type Allocation. This is useful to avoid monomorphizations on T, share code paths going through the allocator, while upholding safety invariants. The allocator contract of the unsafe allocation methods is quite strict and easy to misuse. This primitive can be used as a safe layer on top to avoid dealing with the allocation methods directly.


lib.rs:

Available features

  • allocator-api: Requires nightly and enables allocating with a specific Allocator.

No runtime deps

Features