summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorSebastian Humenda <shumenda@gmx.de>2017-09-07 21:04:24 +0200
committerTobias Schaffner <tschaff@genua.de>2017-09-08 14:36:56 +0200
commit40794bf4b890ed4a6fba9a7c2bee81304a754379 (patch)
treea34659af4c67a48559426d9b7cb389c862f8a3d2 /src/libstd/sys_common
parent0b77464d2234231e13d03acd1d580ab2e3369d64 (diff)
downloadrust-40794bf4b890ed4a6fba9a7c2bee81304a754379.tar.gz
rust-40794bf4b890ed4a6fba9a7c2bee81304a754379.zip
Move the stack size value for L4Re to the min_stack_size function
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/util.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/sys_common/util.rs b/src/libstd/sys_common/util.rs
index daa0c15920b..41be6f43763 100644
--- a/src/libstd/sys_common/util.rs
+++ b/src/libstd/sys_common/util.rs
@@ -22,7 +22,12 @@ pub fn min_stack() -> usize {
         n => return n - 1,
     }
     let amt = env::var("RUST_MIN_STACK").ok().and_then(|s| s.parse().ok());
+    #[cfg(not(target_os = "l4re"))]
     let amt = amt.unwrap_or(2 * 1024 * 1024);
+    // L4Re only supports a maximum of 1Mb per default.
+    #[cfg(target_os = "l4re")]
+    let amt = amt.unwrap_or(1024 * 1024);
+
     // 0 is our sentinel value, so ensure that we'll never see 0 after
     // initialization has run
     MIN.store(amt + 1, Ordering::SeqCst);