Fix MemoryScheme fmap.
This commit is contained in:
+2
-12
@@ -1113,6 +1113,8 @@ pub fn try_correcting_page_tables(faulting_page: Page, access: AccessMode) -> Re
|
||||
// single TLB entry, thus emulating 16k pages albeit with higher page table overhead. With the
|
||||
// correct posix_madvise information, allocating 4 contiguous pages and mapping them together,
|
||||
// might be a useful future optimization.
|
||||
//
|
||||
// TODO: Readahead backwards, i.e. MAP_GROWSDOWN.
|
||||
|
||||
let mut allow_writable = true;
|
||||
|
||||
@@ -1184,15 +1186,3 @@ pub fn try_correcting_page_tables(faulting_page: Page, access: AccessMode) -> Re
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(tests)]
|
||||
mod tests {
|
||||
// TODO: Get these tests working
|
||||
#[test]
|
||||
fn region_collides() {
|
||||
assert!(Region::new(0, 2).collides(Region::new(0, 1)));
|
||||
assert!(Region::new(0, 2).collides(Region::new(1, 1)));
|
||||
assert!(!Region::new(0, 2).collides(Region::new(2, 1)));
|
||||
assert!(!Region::new(0, 2).collides(Region::new(3, 1)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user