Skip to content

Commit

Permalink
Merge pull request rcore-os#391 from YdrMaster/main
Browse files Browse the repository at this point in the history
fix(zCore): nezha 上启动需要更大的启动堆
  • Loading branch information
YdrMaster authored Oct 14, 2022
2 parents 2a0d7b2 + 7615504 commit c07cf1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions zCore/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ const PAGE_BITS: usize = 12;

/// 为启动准备的初始内存。
///
/// 经测试 16 KiB 单核够用,多核不够,故此处给了 32 KiB。
static mut MEMORY: [u8; 8 * 4096] = [0u8; 8 * 4096];
/// 经测试,不同硬件的需求:
///
/// | machine | memory
/// | --------------- | -
/// | qemu,virt SMP 1 | 16 KiB
/// | qemu,virt SMP 4 | 32 KiB
/// | allwinner,nezha | 256 KiB
static mut MEMORY: [u8; 256 << 10] = [0u8; 256 << 10];

unsafe impl GlobalAlloc for LockedHeap {
#[inline]
Expand Down

0 comments on commit c07cf1f

Please sign in to comment.