summaryrefslogtreecommitdiff
path: root/kernel/src/allocators/buddy/mod.rs
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-08-31 00:46:17 -0500
committerNathan Ringo <nathan@remexre.com>2024-08-31 00:46:17 -0500
commit4617f96a99c0e5dfac1b45b3cff037306e4edc63 (patch)
tree45bf1ae799bbaa1d24bb9970c2c052419b3cec42 /kernel/src/allocators/buddy/mod.rs
parent15fd8115739da57c6aa64da9a2ac6e0f0b7ba088 (diff)
Adds a static assertion.
Diffstat (limited to 'kernel/src/allocators/buddy/mod.rs')
-rw-r--r--kernel/src/allocators/buddy/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/src/allocators/buddy/mod.rs b/kernel/src/allocators/buddy/mod.rs
index 261d076..08b30a7 100644
--- a/kernel/src/allocators/buddy/mod.rs
+++ b/kernel/src/allocators/buddy/mod.rs
@@ -47,3 +47,6 @@ mod tree;
/// The index of the largest size class; i.e., one less than the number of size classes.
const MAX_ORDER: usize = 18;
+
+// The max order comes out to a largest size class of 1GiB pages.
+static_assertions::const_assert_eq!(4096 << MAX_ORDER, 1024 * 1024 * 1024);