summaryrefslogtreecommitdiff
path: root/Kernel/PhysicalAddress.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/PhysicalAddress.h')
-rw-r--r--Kernel/PhysicalAddress.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/PhysicalAddress.h b/Kernel/PhysicalAddress.h
index 0a5d0aa4b4..f6d9367e00 100644
--- a/Kernel/PhysicalAddress.h
+++ b/Kernel/PhysicalAddress.h
@@ -6,6 +6,7 @@
#pragma once
+#include <AK/Checked.h>
#include <AK/Format.h>
#include <AK/Types.h>
@@ -30,6 +31,7 @@ public:
}
[[nodiscard]] PhysicalAddress offset(PhysicalPtr o) const { return PhysicalAddress(m_address + o); }
+ [[nodiscard]] bool offset_addition_would_overflow(PhysicalPtr o) const { return Checked<PhysicalPtr>::addition_would_overflow(m_address, o); }
[[nodiscard]] PhysicalPtr get() const { return m_address; }
void set(PhysicalPtr address) { m_address = address; }
void mask(PhysicalPtr m) { m_address &= m; }