Skip to content

Commit 2cec710

Browse files
committed
Only align_up length of bootloader and kernel sections
1 parent 9e3cfac commit 2cec710

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/frame_allocator.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ impl<'a> FrameAllocator<'a> {
7171
region
7272
);
7373

74-
region.len = align_up(region.len, PAGE_SIZE.into());
74+
match region.region_type {
75+
MemoryRegionType::Kernel | MemoryRegionType::Bootloader => {
76+
region.len = align_up(region.len, PAGE_SIZE.into());
77+
}
78+
_ => {}
79+
}
7580

7681
let mut region_already_inserted = false;
7782
let mut split_region = None;

0 commit comments

Comments
 (0)