Skip to content
Snippets Groups Projects
Commit 959ecdad authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix creation of kstack

parent 9bc242c1
No related branches found
No related tags found
No related merge requests found
use alloc::boxed::Box;
use collections::BTreeMap; use collections::BTreeMap;
use core::mem; use core::mem;
use core::sync::atomic::Ordering; use core::sync::atomic::Ordering;
...@@ -64,7 +63,7 @@ impl ContextList { ...@@ -64,7 +63,7 @@ impl ContextList {
let context_lock = self.new_context()?; let context_lock = self.new_context()?;
{ {
let mut context = context_lock.write(); let mut context = context_lock.write();
let mut stack = Box::new([0; 65536]); let mut stack = vec![0; 65536].into_boxed_slice();
let offset = stack.len() - mem::size_of::<usize>(); let offset = stack.len() - mem::size_of::<usize>();
unsafe { unsafe {
let offset = stack.len() - mem::size_of::<usize>(); let offset = stack.len() - mem::size_of::<usize>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment