Enable large stacks on 64-bit architectures
This commit is contained in:
parent
f92b75ac06
commit
7910c72de5
1 changed files with 7 additions and 2 deletions
|
@ -27,6 +27,9 @@
|
|||
#define RUST_DEBUG_MEM "RUST_DEBUG_MEM"
|
||||
#define RUST_DEBUG_BORROW "RUST_DEBUG_BORROW"
|
||||
|
||||
#define DEFAULT_RUST_MIN_STACK_32 0x300
|
||||
#define DEFAULT_RUST_MIN_STACK_64 0x400000
|
||||
|
||||
static lock_and_signal env_lock;
|
||||
|
||||
extern "C" CDECL void
|
||||
|
@ -99,8 +102,10 @@ get_min_stk_size() {
|
|||
if(minsz) {
|
||||
return strtol(minsz, NULL, 0);
|
||||
}
|
||||
else {
|
||||
return 0x300;
|
||||
else if (sizeof(size_t) > 4) {
|
||||
return DEFAULT_RUST_MIN_STACK_64;
|
||||
} else {
|
||||
return DEFAULT_RUST_MIN_STACK_32;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue