bomalloc 0.3.1

A fragmentation-aware experimental allocator built around address-span ownership
Documentation
use bomalloc::{BoGlobalAllocator, TrimMode};

#[global_allocator]
static GLOBAL: BoGlobalAllocator = BoGlobalAllocator::new();

fn main() {
    let sum = std::thread::spawn(|| {
        let values = (0_u64..100_000).collect::<Vec<_>>();
        values.iter().sum::<u64>()
    })
    .join()
    .unwrap();
    println!("sum={sum}");

    let trimmed = GLOBAL
        .trim(TrimMode::Excess)
        .expect("bomalloc initialization failed");
    println!("stats={:?}\ntrim={trimmed:?}", GLOBAL.stats().unwrap());
}