Location
https://doc.rust-lang.org/std/alloc/struct.System.html
https://doc.rust-lang.org/std/alloc/index.html
Summary
System says:
This type implements the GlobalAlloc trait and Rust programs by default work as if they had this definition:
use std::alloc::System;
#[global_allocator]
static A: System = System;
fn main() {
let a = Box::new(4); // Allocates from the system allocator.
println!("{a}");
}
But std::alloc says
Currently the default global allocator is unspecified. Libraries, however, like cdylibs and staticlibs are guaranteed to use the System by default.
(And the example was not library-specific.)
Location
https://doc.rust-lang.org/std/alloc/struct.System.html
https://doc.rust-lang.org/std/alloc/index.html
Summary
Systemsays:But
std::allocsays(And the example was not library-specific.)