Do not zero tables when not necessary in buddy allocator

This commit is contained in:
Jeremy Soller
2020-09-08 13:52:45 -06:00
parent db7869d995
commit 6375c175f7
-3
View File
@@ -102,9 +102,6 @@ impl<A: Arch> BuddyAllocator<A> {
for _ in 0 .. map_pages {
let map_phys = bump_allocator.allocate_one()?;
let map_virt = A::phys_to_virt(map_phys);
for i in 0..Self::MAP_PAGE_BYTES {
A::write(map_virt.add(i), 0);
}
A::write(map_virt.add(Self::MAP_PAGE_BYTES), BuddyMapFooter {
next: entry.map,
});