about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-01-29 21:20:36 -0800
committerBrian Anderson <banderson@mozilla.com>2012-01-29 21:20:39 -0800
commit6548cdd59beca24a90f41d6507cb615e67828b07 (patch)
tree15e0547e2c14ee150e35d4c78d4922b85102cb5f /src/rt/rust_task.cpp
parent361f90e618c081afe2fa8b0a67370610781e413e (diff)
downloadrust-6548cdd59beca24a90f41d6507cb615e67828b07.tar.gz
rust-6548cdd59beca24a90f41d6507cb615e67828b07.zip
rt: Make the initial segment of the main task's stack 1MB
This is a trick to fool microbenchmarks. Closes #1681
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 4d136a59ae6..d6f43ca0794 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -239,7 +239,8 @@ del_stk(rust_task *task, stk_seg *stk)
 
 // Tasks
 rust_task::rust_task(rust_scheduler *sched, rust_task_list *state,
-                     rust_task *spawner, const char *name) :
+                     rust_task *spawner, const char *name,
+                     size_t init_stack_sz) :
     ref_count(1),
     stk(NULL),
     runtime_sp(0),
@@ -271,7 +272,7 @@ rust_task::rust_task(rust_scheduler *sched, rust_task_list *state,
 
     user.notify_enabled = 0;
 
-    stk = new_stk(sched, this, 0);
+    stk = new_stk(sched, this, init_stack_sz);
     user.rust_sp = stk->end;
     if (supervisor) {
         supervisor->ref();