summaryrefslogtreecommitdiff
path: root/crates/buddy_allocator/src/tree.rs
diff options
context:
space:
mode:
authorNathan Ringo <nathan@remexre.com>2024-08-31 23:30:46 -0500
committerNathan Ringo <nathan@remexre.com>2024-08-31 23:32:37 -0500
commit439b93dd3e22311caee6d69eb4aa1da5b81a0731 (patch)
treefdc2693067c82c032c8de04b62acbe99806883cd /crates/buddy_allocator/src/tree.rs
parente9a79a0ed79609c1e293c7b221fce577200b2eb7 (diff)
Almost all of buddy initialization.
Diffstat (limited to 'crates/buddy_allocator/src/tree.rs')
-rw-r--r--crates/buddy_allocator/src/tree.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/buddy_allocator/src/tree.rs b/crates/buddy_allocator/src/tree.rs
index a303d40..1673e26 100644
--- a/crates/buddy_allocator/src/tree.rs
+++ b/crates/buddy_allocator/src/tree.rs
@@ -5,13 +5,13 @@
#[derive(Debug)]
pub struct Tree<'buddy, const PAGE_SIZE: usize, const PAGE_SIZE_BITS: usize> {
/// The base address of the tree.
- pub base: *const (),
+ pub base_ptr: *const [u8; PAGE_SIZE],
/// The log2 of the number of pages in the region represented by the tree.
- pub log2_page_count: usize,
+ pub size_class: usize,
/// The offset in the bitset to the bits responsible for this tree's pages.
- bitset_offset: usize,
+ pub bitset_offset: usize,
// /// The bitset used to track whether subregion are allocated or not in this tree.
// pub bitset: &'buddy mut BitVec,