diff --git a/os/src/config.rs b/os/src/config.rs new file mode 100644 index 00000000..ea43a373 --- /dev/null +++ b/os/src/config.rs @@ -0,0 +1,7 @@ +// constants for the operating system +#![allow(unused)] + +// about memory management +pub const PAGE_SIZE: usize = 4096; +pub const KERNEL_HEAP_SIZE: usize = 16 * 1024 * 1024; // 16MB +pub const USER_STACK_SIZE: usize = 4 * 1024 * 1024; // 4MB \ No newline at end of file diff --git a/os/src/main.rs b/os/src/main.rs index 6686807e..e4bcce04 100644 --- a/os/src/main.rs +++ b/os/src/main.rs @@ -7,6 +7,7 @@ #[macro_use] mod console; mod sbi; +mod config; use core::arch::global_asm; use core::panic::PanicInfo; diff --git a/os/src/mm/address/.gitkeep b/os/src/mm/address/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/os/src/mm/allocation/.gitkeep b/os/src/mm/allocation/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/os/src/mm/global_allocator/.gitkeep b/os/src/mm/global_allocator/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/os/src/mm/pagetable/.gitkeep b/os/src/mm/pagetable/.gitkeep new file mode 100644 index 00000000..e69de29b