Skip to content

Commit

Permalink
Remove -Xmx500M default max heap size. jruby/jruby#3739.
Browse files Browse the repository at this point in the history
Still needs a new Windows exe build.
  • Loading branch information
headius committed May 15, 2018
1 parent d654446 commit aaea124
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions argparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,21 +502,14 @@ void ArgParser::prepareOptions() {

void ArgParser::setupMaxHeapAndStack(list<string> userOptions) {
// Hard-coded 500m, 2048k is for consistency with jruby shell script.
string heapSize("500m"), stackSize("2048k");
bool maxHeap = false, maxStack = false;
string stackSize("2048k");
bool maxStack = false;
for (list<string>::iterator it = userOptions.begin(); it != userOptions.end(); it++) {
if (!maxHeap && strncmp("-Xmx", it->c_str(), 4) == 0) {
heapSize = it->substr(4, it->size() - 4);
maxHeap = true;
}
if (!maxStack && strncmp("-Xss", it->c_str(), 4) == 0) {
stackSize = it->substr(4, it->size() - 4);
maxStack = true;
}
}
if (!maxHeap) {
javaOptions.push_back("-Xmx" + heapSize);
}
if (!maxStack) {
javaOptions.push_back("-Xss" + stackSize);
}
Expand Down

0 comments on commit aaea124

Please sign in to comment.