From 8e19183ec85e9c20b932543c4ca4a3b000c910f3 Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Fri, 22 Jul 2022 09:06:39 +0000 Subject: [PATCH] CallFrames: use AlignedMemory::new_with_size() to allocate stack space --- src/call_frames.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/call_frames.rs b/src/call_frames.rs index 7a1cf5185..010e279de 100644 --- a/src/call_frames.rs +++ b/src/call_frames.rs @@ -33,8 +33,7 @@ impl<'a> CallFrames<'a> { /// New call frame, depth indicates maximum call depth pub fn new(config: &'a Config) -> Self { let stack_len = config.stack_size(); - let mut stack = AlignedMemory::new(stack_len); - stack.resize(stack_len, 0).unwrap(); + let stack = AlignedMemory::new_with_size(stack_len); let mut frames = CallFrames { config,