Fix buddy map footer read address

This commit is contained in:
Jeremy Soller
2020-09-09 11:11:39 -06:00
parent fed3110ae8
commit 711414223b
+2 -2
View File
@@ -163,7 +163,7 @@ impl<A: Arch> FrameAllocator for BuddyAllocator<A> {
offset += A::PAGE_SIZE * 8;
}
let footer = A::read::<BuddyMapFooter>(map_virt);
let footer = A::read::<BuddyMapFooter>(map_virt.add(Self::MAP_PAGE_BYTES));
map_phys = footer.next;
}
}
@@ -199,7 +199,7 @@ impl<A: Arch> FrameAllocator for BuddyAllocator<A> {
A::write(map_byte_virt, value);
break;
} else {
let footer = A::read::<BuddyMapFooter>(map_virt);
let footer = A::read::<BuddyMapFooter>(map_virt.add(Self::MAP_PAGE_BYTES));
map_phys = footer.next;
map_page -= 1;
}