From e697a52359874c2b7387be96e664b1f94b14255b Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Mon, 25 Jul 2011 15:02:43 -0700 Subject: 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. --- src/rt/rust_task.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rt/rust_task.cpp') 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; } } -- cgit 1.4.1-3-g733a5