diff --git a/riscv/runtime/src/allocator.rs b/riscv/runtime/src/allocator.rs index 7fd933c8a..8828ab729 100644 --- a/riscv/runtime/src/allocator.rs +++ b/riscv/runtime/src/allocator.rs @@ -27,6 +27,10 @@ impl FixedMemoryAllocator { unsafe impl GlobalAlloc for FixedMemoryAllocator { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { + self.alloc_zeroed(layout) + } + + unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { // Start address of the allocation array: let array_start = addr_of!(self.mem_buffer) as usize;