diff --git a/runner/src/main/scala/org/overviewproject/runner/commands/JvmCommand.scala b/runner/src/main/scala/org/overviewproject/runner/commands/JvmCommand.scala index 2c06f6082..3d46fa31c 100644 --- a/runner/src/main/scala/org/overviewproject/runner/commands/JvmCommand.scala +++ b/runner/src/main/scala/org/overviewproject/runner/commands/JvmCommand.scala @@ -48,7 +48,7 @@ class JvmCommand( private def is32BitMarker(is32Bit: Boolean) : Seq[String] = { if (is32Bit) { - Seq("-Doverview.is32BitJava=true") + Seq("-server", "-Doverview.is32BitJava=true") } else { Seq() } @@ -92,6 +92,6 @@ object JvmCommand { retval == 0 } - private val Max32BitHeapSize : Long = 1610612736 // 1.5g - private val Max32BitHeapSizeString : String = "1536m" + private val Max32BitHeapSize : Long = 1468006400 + private val Max32BitHeapSizeString : String = "1400m" } diff --git a/runner/src/test/scala/org/overviewproject/runner/commands/JvmCommandSpec.scala b/runner/src/test/scala/org/overviewproject/runner/commands/JvmCommandSpec.scala index f6ba338a7..9c43877d0 100644 --- a/runner/src/test/scala/org/overviewproject/runner/commands/JvmCommandSpec.scala +++ b/runner/src/test/scala/org/overviewproject/runner/commands/JvmCommandSpec.scala @@ -37,12 +37,12 @@ class JvmCommandSpec extends Specification { "decrease heap sizes in with32BitSafe(false)" in { val cmd = new JvmCommand(Seq(), Seq("-Xms3g", "-Xmx4000m", "-Xmn2000000k", "-Xint"), Seq()) - cmd.with32BitSafe(false).jvmArgs.take(4) must beEqualTo(Seq("-Xms1536m", "-Xmx1536m", "-Xmn1536m", "-Xint")) + cmd.with32BitSafe(false).jvmArgs.take(4) must beEqualTo(Seq("-Xms1400m", "-Xmx1400m", "-Xmn1400m", "-Xint")) } - "add -Doverview.is32BitJava=true in with32BitSafe(false)" in { + "add -server -Doverview.is32BitJava=true in with32BitSafe(false)" in { val cmd = new JvmCommand(Seq(), Seq("-Xfoo"), Seq()) - cmd.with32BitSafe(false).jvmArgs must beEqualTo(Seq("-Xfoo", "-Doverview.is32BitJava=true")) + cmd.with32BitSafe(false).jvmArgs must beEqualTo(Seq("-Xfoo", "-server", "-Doverview.is32BitJava=true")) } "not decrease heap sizes in with32BitSafe(true)" in { @@ -50,13 +50,13 @@ class JvmCommandSpec extends Specification { cmd.with32BitSafe(true).jvmArgs.take(4) must beEqualTo(cmd.jvmArgs) } - "not add -Doverview.is32BitJava=true in with32BitSafe(true)" in { + "not add -server -Doverview.is32BitJava=true in with32BitSafe(true)" in { val cmd = new JvmCommand(Seq(), Seq("-Xfoo"), Seq()) cmd.with32BitSafe(true).jvmArgs must beEqualTo(Seq("-Xfoo")) } "not decrease heap sizes when they are small enough already" in { - val cmd = new JvmCommand(Seq(), Seq("-Xms1024m", "-Xmx1500m", "-Xmn200k", "-Xint"), Seq()) + val cmd = new JvmCommand(Seq(), Seq("-Xms1024m", "-Xmx1350m", "-Xmn200k", "-Xint"), Seq()) cmd.with32BitSafe(false).jvmArgs.take(4) must beEqualTo(cmd.jvmArgs) } }