diff --git a/agb/examples/allocation.rs b/agb/examples/allocation.rs new file mode 100644 index 00000000..327ed07e --- /dev/null +++ b/agb/examples/allocation.rs @@ -0,0 +1,15 @@ +#![no_std] +#![no_main] + +extern crate agb; +extern crate alloc; + +use alloc::boxed::Box; + +#[agb::entry] +fn main() -> ! { + loop { + let b = Box::new(1); + agb::println!("dynamic allocation made to {:?}", &*b as *const _); + } +}