From 1f192430956704ddf263aba0cfb5b8856c547beb Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Sun, 10 Nov 2013 14:46:41 -0800
Subject: [PATCH] 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.
---
 src/libstd/rt/env.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libstd/rt/env.rs b/src/libstd/rt/env.rs
index 0811f7bbbdc..d1bd450afe2 100644
--- a/src/libstd/rt/env.rs
+++ b/src/libstd/rt/env.rs
@@ -17,7 +17,7 @@ use os;
 // Note that these are all accessed without any synchronization.
 // They are expected to be initialized once then left alone.
 
-static mut MIN_STACK: uint = 4000000;
+static mut MIN_STACK: uint = 2000000;
 static mut DEBUG_BORROW: bool = false;
 static mut POISON_ON_FREE: bool = false;