Skip to content

Commit 1f19243

Browse files
committed
Decrease the default stack size back to 2MB
I increased this to 4MB when I implemented abort-on-stack-overflow for Rust functions. Now that the fixed_stack_segment attribute is removed, no rust function will ever reasonably request 2MB of stack (due to calling an FFI function). The default size of 2MB should be plenty for everyday use-cases, and tasks can still request more stack via the spawning API.
1 parent 7755ffd commit 1f19243

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/rt/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use os;
1717
// Note that these are all accessed without any synchronization.
1818
// They are expected to be initialized once then left alone.
1919

20-
static mut MIN_STACK: uint = 4000000;
20+
static mut MIN_STACK: uint = 2000000;
2121
static mut DEBUG_BORROW: bool = false;
2222
static mut POISON_ON_FREE: bool = false;
2323

0 commit comments

Comments
 (0)