diff options
author | Christian Cunningham <cc@localhost> | 2022-08-20 12:09:16 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-08-20 12:09:16 -0700 |
commit | ce4585a574c638f4dfa0b482074d4c3134cab2f9 (patch) | |
tree | 538072f14daa252b7b1ed559afe034cec2fddba8 /src/kernel.rs | |
parent | 917073ec51151596e54fb063b943aab20e584336 (diff) |
Allocate in-between
Diffstat (limited to 'src/kernel.rs')
-rw-r--r-- | src/kernel.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/kernel.rs b/src/kernel.rs index 321f34c..b0c5104 100644 --- a/src/kernel.rs +++ b/src/kernel.rs @@ -17,6 +17,7 @@ #![no_std] extern crate alloc; +use alloc::boxed::Box; mod mem; mod console; @@ -58,5 +59,13 @@ fn kernel_main() -> ! { } } println!("I should be able to print {} here!", 5); + { + let a: Box<u8> = Box::new(5); + let b: Box<u8> = Box::new(5); + let c: Box<(u8,u8,u8)> = Box::new((3,5,8)); + println!("{:?}", a); + println!("{:?}", b); + println!("{:?}", c); + } loop { } } |