Memory management

Minimum memory

The amount of memory utilized by Diffblue Cover depends on the complexity of the project being analysed - complex projects will require more memory than simple projects. The minimum system requirements are 16GB RAM with 8GB allocated as heap for Java to use. By default Java allocates a quarter of the total RAM as heap, therefore this must be overridden where the amount of RAM is less than 32GB. Recommended system requirements for running Diffblue Cover alongside other memory-intensive applications include 32GB of RAM.

Out of memory due to complex projects

Not allocating enough heap to Java can result in out of memory errors - in these circumstances it's necessary to increase the memory available to Diffblue Cover above 8GB. As a general, the memory requirements of Diffblue Cover are proportional to the memory requirements of the project being analyzed.

Increasing Java heap

The Java option -Xmx<max heap size> sets the maximum heap allocated to Java (more information about this option is available in the Java documentation; e.g. for Java 8 https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html).

Diffblue Cover utilizes the environment variable JVM_ARGS to specify Java options to use when running Diffblue Cover. Adding the Java option -Xmx<max heap size> to the JVM_ARGS environment variable will ensure that Diffblue Cover is allocated a specific portion of system memory.

CMD example to set maximum heap available to Diffblue Cover to 8GB:

set JVM_ARGS=-Xmx8g

PowerShell example to set maximum heap available to Diffblue Cover to 8GB:

setx JVM_ARGS "-Xmx8g"

Last updated