mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
AK: Add offset_in_page() method in PhysicalAddress class
This method is useful for later usage.
This commit is contained in:
parent
fe664965c2
commit
43d570a1e3
1 changed files with 1 additions and 0 deletions
|
@ -48,6 +48,7 @@ public:
|
|||
const u8* as_ptr() const { return reinterpret_cast<const u8*>(m_address); }
|
||||
|
||||
PhysicalAddress page_base() const { return PhysicalAddress(m_address & 0xfffff000); }
|
||||
PhysicalAddress offset_in_page() const { return PhysicalAddress(m_address & 0xfff); }
|
||||
|
||||
bool operator==(const PhysicalAddress& other) const { return m_address == other.m_address; }
|
||||
bool operator!=(const PhysicalAddress& other) const { return m_address != other.m_address; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue