(我目前在写 chp3。 背景:“锯齿螈”内核(就是先一次性加载所有程序,然后顺序运行),ch3分支。 问题概述:假设每个程序是2MB,一共两个程序。那么它们在链接时会在0x8020_0000上面一点,但是运行前会分别被拷贝到[0x8040_0000,0x8060_0000)和[0x8060_0000,0x8080_0000)。然后修改第二个用户程序,只需要改成`println!("{}",1)`,然后在`fs.rs`里打印缓冲区起始地址,会发现它并不在[0x8060_0000,0x8080_0000)之间,而是0x8020_0000上一点(即链接的位置)。 <img width="863" alt="WX20220320-223258@2x" src="https://user-images.githubusercontent.com/28479651/159167489-72bb998c-0a7a-4dc2-8ecf-d03317950614.png"> <img width="579" alt="image" src="https://user-images.githubusercontent.com/28479651/159167507-71b101b6-ff20-451d-a89d-6808fda9f7ed.png"> <img width="668" alt="image" src="https://user-images.githubusercontent.com/28479651/159167518-aa7d11e2-135d-4338-805b-27f933315024.png">