removed UB

This commit is contained in:
Erin 2023-06-20 19:00:23 +02:00 committed by ondra05
parent f85e3eb062
commit 2c20c7c859

View file

@ -30,7 +30,7 @@ impl Memory {
let mut entry = PtEntry::new(
{
let layout = alloc::alloc::Layout::from_size_align_unchecked(4096, 4096);
let ptr = alloc::alloc::alloc(layout);
let ptr = alloc::alloc::alloc_zeroed(layout);
if ptr.is_null() {
alloc::alloc::handle_alloc_error(layout);
}