use std::alloc::System;
#[cfg(not(miri))]
use spinning_top::RawSpinlock;
#[cfg(not(miri))]
use talc::{TalcLock, source::GlobalAllocSource};
#[global_allocator]
#[cfg(not(miri))]
static TALC: TalcLock<RawSpinlock, GlobalAllocSource<System>> =
TalcLock::new(GlobalAllocSource::new(System));
fn main() {
eprint!("Doing some small allocations... ");
let mut vec = Vec::with_capacity(100);
vec.extend(0..300usize);
vec.truncate(100);
vec.shrink_to_fit();
eprintln!("Done!");
eprintln!("How about a little more!");
vec.extend(0..100000usize);
drop(vec);
eprintln!("Done! Ending...");
}