This commit is contained in:
travis-update-bot
2015-12-30 23:07:52 +00:00
parent 66417a1b72
commit 262aec97ae

View File

@@ -458,7 +458,7 @@ pub fn translate(virtual_address: VirtualAddress) -> Option<PhysicalAddress> {
It uses two functions we haven't defined yet: `translate_page` and `Page::containing_address`. Let's start with the latter:
```rust
fn containing_address(address: VirtualAddress) -> Page {
pub fn containing_address(address: VirtualAddress) -> Page {
assert!(address < 0x0000_8000_0000_0000 || address >= 0xffff_8000_0000_0000,
"invalid address: 0x{:x}", address);
Page { number: address / PAGE_SIZE }