Handle backspace for k210/qemu platform && Add lots of user tests.

This commit is contained in:
Yifan Wu 2020-12-11 01:44:07 +08:00
parent f69b3e11dd
commit 48a11e53ff
20 changed files with 361 additions and 35 deletions

View file

@ -48,6 +48,7 @@ impl StackFrameAllocator {
pub fn init(&mut self, l: PhysPageNum, r: PhysPageNum) {
self.current = l.0;
self.end = r.0;
println!("last {} Physical Frames.", self.end - self.current);
}
}
impl FrameAllocator for StackFrameAllocator {

View file

@ -47,10 +47,6 @@ impl MemorySet {
areas: Vec::new(),
}
}
#[allow(unused)]
pub fn dealloc_all_frames(&mut self) {
*self = Self::new_bare();
}
pub fn token(&self) -> usize {
self.page_table.token()
}
@ -217,7 +213,8 @@ impl MemorySet {
self.page_table.translate(vpn)
}
pub fn clear(&mut self) {
*self = Self::new_bare();
//*self = Self::new_bare();
self.areas.clear();
}
}