Skip to content

Commit 2665eb0

Browse files
committed
Merge pull request comix-kernel#11 from comix-kernel/feat/mm/configs
创建内存管理的基本文件结构和相关配置
2 parents 5b1180a + 107b249 commit 2665eb0

6 files changed

Lines changed: 8 additions & 0 deletions

File tree

os/src/config.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// constants for the operating system
2+
#![allow(unused)]
3+
4+
// about memory management
5+
pub const PAGE_SIZE: usize = 4096;
6+
pub const KERNEL_HEAP_SIZE: usize = 16 * 1024 * 1024; // 16MB
7+
pub const USER_STACK_SIZE: usize = 4 * 1024 * 1024; // 4MB

os/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#[macro_use]
88
mod console;
99
mod sbi;
10+
mod config;
1011

1112
use core::arch::global_asm;
1213
use core::panic::PanicInfo;

os/src/mm/address/.gitkeep

Whitespace-only changes.

os/src/mm/allocation/.gitkeep

Whitespace-only changes.

os/src/mm/global_allocator/.gitkeep

Whitespace-only changes.

os/src/mm/pagetable/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)