Enable large stacks on 64-bit architectures

This commit is contained in:
Brendan Cully 2013-07-10 21:51:12 -07:00 committed by Brendan Cully
parent f92b75ac06
commit 7910c72de5

View file

@ -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;
}
}