//! Global heap memory allocator.
//!
//! This module provide's vexide's `#[global_allocator]`, which is implemented using the `talc`
//! crate. This allocator is preferred over the default `dlmalloc` allocator provided by libstd
//! because it's more optimized with respect to both performance and size.
//!
//! [`claim`] must be called before any heap allocations are made. This is done automatically when
//! calling [`startup`](crate::startup), so you should not need to call it yourself unless you are
//! writing your own startup routine implementation or need to claim a new heap region.
use ;
static ALLOCATOR: = new.lock;
/// Claims a region of memory as heap space.
///
/// # Safety
///
/// - The memory within the `memory` must be valid for reads and writes, and memory therein (when
/// not allocated to the user) must not be mutated while the allocator is in use.
///
/// - The region encompassed from [`start`, `end`] should not overlap with any other active heap
/// regions.
// Silences warnings when not compiling for VEXos
pub unsafe