Search code examples
javamemoryheap-memoryalloy

How to get Java to give Alloy more memory


I am using alloy4.2, and I am not able to tell it to use more memory.
I am not a Java expert and I suspect the problem is in how I'm configuring Java.
I am using OpenJDK Runtime Environment 1.8.0_131.
I have also tried 1.8.0_151. My VM is running in Ubuntu x64.
Under the Alloy Options tab, Maximum Memory To Use is always stuck at the default of 768M.
I am using a VM that has 16G of memory available.
I have tried setting the Java stack parameters
-Xms1g and -Xmx8g
at the command line when I invoke Java, and also using the "export _JAVA_OPTS" to no avail.

Java says it is "picking up" the Xms and Xmx values and when I run Java -XshowSettings:vm it shows that I have a max heap size of approx. 7.9G.

But Alloy doesn't let me increase the memory beyond the tiny minimum size of 768M. Any idea what I am doing wrong?


Solution

  • The numbers are hardcoded in Alloy although 4.2 should have 4Gb included? (There are a number of variants of 4.2 out there I think.)

    We're working on creating a 5.0.0 version at the moment but that is not really publishable yet. You can download a snapshot JAR from:

    https://oss.sonatype.org/content/repositories/snapshots/org/alloytools/org.alloytools.alloy.dist/5.0.0-SNAPSHOT/