Skip to content

Enable large stacks on 64-bit architectures #7728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/rt/rust_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
}

Expand Down