redox/kernel/arch/x86_64/physical.rs
ticki 3967c0f291 Strongly typed virtual/physical memory seperation.
This minicommit introduces two newtpyes, `Physical` and `Virtual`,
respectively. These serves as a way to segregate the different forms of
addresses to avoid the issues we had in the old kernel.
2016-08-14 19:21:21 +02:00

12 lines
315 B
Rust

//! Typestrong address segregation.
/// A physical address in memory.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Physical {
/// The position.
///
/// Note that we do not use a pointer here to avoid simple mistakes where the programmer
/// confuse virtual and physical.
pub inner: u64,
}