We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c0a2ed commit d7db25eCopy full SHA for d7db25e
src/rt/rust_task.cpp
@@ -15,13 +15,22 @@
15
// FIXME (issue #151): This should be 0x300; the change here is for
16
// practicality's sake until stack growth is working.
17
18
-static size_t const min_stk_bytes = 0x200000;
+static size_t get_min_stk_size() {
19
+ char *stack_size = getenv("RUST_MIN_STACK");
20
+ if(stack_size) {
21
+ return atoi(stack_size);
22
+ }
23
+ else {
24
+ return 0x200000;
25
26
+}
27
28
// Task stack segments. Heap allocated and chained together.
29
30
static stk_seg*
31
new_stk(rust_task *task, size_t minsz)
32
{
33
+ size_t min_stk_bytes = get_min_stk_size();
34
if (minsz < min_stk_bytes)
35
minsz = min_stk_bytes;
36
size_t sz = sizeof(stk_seg) + minsz;
0 commit comments