wasm: increase default thread stack size to 1 MB
The default stack size for the main thread is 1 MB as specified by linker options. However, the default stack size for threads was only 64 kB. This is surprisingly small and thus we increase it to 1 MB to match the main thread.
This commit is contained in:
parent
d8e44b722a
commit
38cf49dde8
2 changed files with 2 additions and 2 deletions
|
|
@ -67,7 +67,7 @@ cfg_if::cfg_if! {
|
|||
}
|
||||
}
|
||||
|
||||
pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024;
|
||||
pub const DEFAULT_MIN_STACK_SIZE: usize = 1024 * 1024;
|
||||
|
||||
impl Thread {
|
||||
// unsafe: see thread::Builder::spawn_unchecked for safety requirements
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use crate::time::Duration;
|
|||
|
||||
pub struct Thread(!);
|
||||
|
||||
pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024;
|
||||
pub const DEFAULT_MIN_STACK_SIZE: usize = 1024 * 1024;
|
||||
|
||||
impl Thread {
|
||||
// unsafe: see thread::Builder::spawn_unchecked for safety requirements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue