about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-07-25 15:02:43 -0700
committerEric Holk <eholk@mozilla.com>2011-07-28 10:47:28 -0700
commite697a52359874c2b7387be96e664b1f94b14255b (patch)
treefd26091e3372bb53af9fc5bdf4e7bd413a3ade82 /src/rt/rust_task.cpp
parent117e251733975e026bdc57f4bdaecf9253d3b575 (diff)
downloadrust-e697a52359874c2b7387be96e664b1f94b14255b.tar.gz
rust-e697a52359874c2b7387be96e664b1f94b14255b.zip
Adding a function to stdlib to set the min stack size, for programs
that absolutely will not succeed with a large default stack. This
should be removed once we have stack grown working.

Also updated word-count to succeed under the new test framework.
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 10ea48f57c2..538a9b34e56 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -14,6 +14,7 @@
 
 // FIXME (issue #151): This should be 0x300; the change here is for
 // practicality's sake until stack growth is working.
+size_t g_min_stack_size = 0x300000;
 
 static size_t get_min_stk_size() {
     char *stack_size = getenv("RUST_MIN_STACK");
@@ -21,7 +22,7 @@ static size_t get_min_stk_size() {
         return strtol(stack_size, NULL, 0);
     }
     else {
-        return 0x300000;
+        return g_min_stack_size;
     }
 }