Heap test passed on k210/qemu, heap size = 3M.

This commit is contained in:
Yifan Wu 2020-12-02 10:32:26 +08:00
parent 850559e5da
commit 528d99258a
7 changed files with 81 additions and 11 deletions

View file

@ -4,6 +4,9 @@
#![feature(llvm_asm)]
#![feature(panic_info_message)]
#![feature(const_in_array_repeat_expressions)]
#![feature(alloc_error_handler)]
extern crate alloc;
#[macro_use]
mod console;
@ -15,6 +18,7 @@ mod loader;
mod config;
mod task;
mod timer;
mod mm;
global_asm!(include_str!("entry.asm"));
global_asm!(include_str!("link_app.S"));
@ -33,6 +37,9 @@ fn clear_bss() {
pub fn rust_main() -> ! {
clear_bss();
println!("[kernel] Hello, world!");
mm::init_heap();
mm::heap_test();
loop {}
trap::init();
loader::load_apps();
trap::enable_interrupt();