File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 4c0a2ed378cfdf5528cec813f1e02a42891edb2a
2
+ refs/heads/master: d7db25e8f60af6894556a14cd420f7523f33e89b
Original file line number Diff line number Diff line change 15
15
// FIXME (issue #151): This should be 0x300; the change here is for
16
16
// practicality's sake until stack growth is working.
17
17
18
- static size_t const min_stk_bytes = 0x200000 ;
18
+ 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
+ }
19
27
20
28
// Task stack segments. Heap allocated and chained together.
21
29
22
30
static stk_seg*
23
31
new_stk (rust_task *task, size_t minsz)
24
32
{
33
+ size_t min_stk_bytes = get_min_stk_size ();
25
34
if (minsz < min_stk_bytes)
26
35
minsz = min_stk_bytes;
27
36
size_t sz = sizeof (stk_seg) + minsz;
You can’t perform that action at this time.
0 commit comments