Skip to content

Commit

Permalink
CallFrames: use AlignedMemory::new_with_size() to allocate stack space
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrod committed Jul 22, 2022
1 parent c4ef657 commit 8e19183
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/call_frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8e19183

Please sign in to comment.