Add allocation example

This commit is contained in:
Gwilym Kuiper 2021-08-16 23:28:33 +01:00
parent 22189eb809
commit 469db77437

View file

@ -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 _);
}
}