Fix memory size.

master
Yuhao Zhou 6 years ago
parent e5eeccffaf
commit cbb4431231

@ -5,7 +5,7 @@ pub const KERNEL_OFFSET: usize = 0x80100000;
pub const KERNEL_HEAP_SIZE: usize = 0x00a0_0000; pub const KERNEL_HEAP_SIZE: usize = 0x00a0_0000;
pub const MEMORY_OFFSET: usize = 0x8000_0000; pub const MEMORY_OFFSET: usize = 0x8000_0000;
pub const MEMORY_END: usize = 0x8100_0000; pub const MEMORY_END: usize = 0x8800_0000;
pub const USER_STACK_OFFSET: usize = 0x80000000 - USER_STACK_SIZE; pub const USER_STACK_OFFSET: usize = 0x80000000 - USER_STACK_SIZE;
pub const USER_STACK_SIZE: usize = 0x10000; pub const USER_STACK_SIZE: usize = 0x10000;

@ -17,11 +17,11 @@ pub type MemorySet = rcore_memory::memory_set::MemorySet<InactivePageTable0>;
pub type FrameAlloc = bit_allocator::BitAlloc16M; pub type FrameAlloc = bit_allocator::BitAlloc16M;
// RISCV has 8M memory // RISCV has 8M memory
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64", target_arch = "mips"))] #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
pub type FrameAlloc = bit_allocator::BitAlloc4K; pub type FrameAlloc = bit_allocator::BitAlloc4K;
// Raspberry Pi 3 has 1G memory // Raspberry Pi 3 has 1G memory
#[cfg(target_arch = "aarch64")] #[cfg(any(target_arch = "aarch64", target_arch = "mips"))]
pub type FrameAlloc = bit_allocator::BitAlloc1M; pub type FrameAlloc = bit_allocator::BitAlloc1M;
lazy_static! { lazy_static! {

Loading…
Cancel
Save