diff --git a/src/mm/allocator.rs b/src/mm/allocator.rs index cf77a5374b..c068a5ddcd 100644 --- a/src/mm/allocator.rs +++ b/src/mm/allocator.rs @@ -3,7 +3,6 @@ use core::alloc::{GlobalAlloc, Layout}; -use align_address::Align; use hermit_sync::RawInterruptTicketMutex; use talc::{ErrOnOom, Span, Talc, Talck}; @@ -16,13 +15,10 @@ impl LockedAllocator { #[inline] fn align_layout(layout: Layout) -> Layout { - let size = layout - .size() - .align_up(core::mem::size_of::>()); let align = layout .align() .max(core::mem::align_of::>()); - Layout::from_size_align(size, align).unwrap() + Layout::from_size_align(layout.size(), align).unwrap() } pub unsafe fn init(&self, heap_bottom: *mut u8, heap_size: usize) {