Skip to content

Commit 1f3ff77

Browse files
committed
Add additional valid starting VM arguments
These were introduced in Java 8u191 (2018-10-16). An important note on `MinRAMPercentage`: it is only used on ''small'' heap sizes (think <100M). It is primarily used for container applications. The properties match the following requirements: * No `"` or `%` character (the double values do not include `%`) * Values include `.` (0x2E) and 0-9 (0x30-0x39); that is between `0x20` and `0x17E` * The strings do not include `\` While these properties were originally introduced for containers, they are also useful for desktop applications. Of specific note, `MaxRAMPercentage` is useful for applications that can have a _small_ amount of data in memory to a _large_ amount of data in memory. Default values: * InitialRAMPercentage: 1.5625 * MinRamPercentage: 50.0 * MaxRamPercentage: 25.0
1 parent e8f02c4 commit 1f3ff77

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/java/net/adoptopenjdk/icedteaweb/jvm/JvmUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,10 @@ private static String[] getValidStartingVMArguments() {
239239
"-XX:GCTimeLimit",
240240
"-XX:GCHeapFreeLimit",
241241
"-XX:+UseParNewGC",
242-
"-XX:+CMSParallelRemarkEnabled"
242+
"-XX:+CMSParallelRemarkEnabled",
243+
"-XX:InitialRAMPercentage", /* The initial heap size as percentage of total memory, conflicts with Xms */
244+
"-XX:MinRAMPercentage", /* Sets the max heap size of RAM as a percentage before looking at other heuristics like MaxRAMPercentage. This is primarily useful for low memory environments (<100m) */
245+
"-XX:MaxRAMPercentage", /* Sets the max heap size of RAM as a percentage */
243246
};
244247
}
245248

0 commit comments

Comments
 (0)