Skip to content
Snippets Groups Projects
Commit a8ecfc86 authored by Robert Węcławski's avatar Robert Węcławski
Browse files

Better comment and mask representation

parent 08a4c33b
No related branches found
No related tags found
1 merge request!66Page table optimization
......@@ -24,14 +24,14 @@ bitflags! {
}
pub const ADDRESS_MASK: usize = 0x000f_ffff_ffff_f000;
pub const COUNTER_MASK: u64 = 0x3ff00000_00000000;
pub const COUNTER_MASK: u64 = 0x3ff0_0000_0000_0000;
impl Entry {
/// Zero entry
/// Clear entry
pub fn set_zero(&mut self) {
self.0 = 0;
}
/// Is the entry unused?
pub fn is_unused(&self) -> bool {
self.0 == (self.0 & COUNTER_MASK)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment