Skip to content

Commit 0254655

Browse files
committed
---
yaml --- r: 64271 b: refs/heads/snap-stage3 c: 4e1292a h: refs/heads/master i: 64269: 5f91017 64267: eae1785 64263: 629e828 64255: 1bdb44a v: v3
1 parent 0055c46 commit 0254655

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 96b3163c835eb3821e23deefb57c86d80324a54a
4+
refs/heads/snap-stage3: 4e1292ad6bb48010a224e0c43d13e628359fe003
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/rt/rust_env.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
#define RUST_DEBUG_MEM "RUST_DEBUG_MEM"
2828
#define RUST_DEBUG_BORROW "RUST_DEBUG_BORROW"
2929

30+
#define DEFAULT_RUST_MIN_STACK_32 0x300
31+
#define DEFAULT_RUST_MIN_STACK_64 0x400000
32+
3033
static lock_and_signal env_lock;
3134

3235
extern "C" CDECL void
@@ -99,8 +102,10 @@ get_min_stk_size() {
99102
if(minsz) {
100103
return strtol(minsz, NULL, 0);
101104
}
102-
else {
103-
return 0x300;
105+
else if (sizeof(size_t) > 4) {
106+
return DEFAULT_RUST_MIN_STACK_64;
107+
} else {
108+
return DEFAULT_RUST_MIN_STACK_32;
104109
}
105110
}
106111

0 commit comments

Comments
 (0)