Changing javac default initial heap size

David Holmes david.holmes at oracle.com
Tue Oct 10 23:44:34 UTC 2017


Hi Wade,

On 11/10/2017 9:01 AM, Wade Hennessey wrote:
> The default initial heap size in OpenJDK9 is 8m (-Xms8m), and I'd like to
> increase it, but I can't find how this is specified in the build process.
> It seams that most/all java binaries are based on the same main.c program
> that launches a specific binary such as javac by passing it parameters
> through some sort of "Launcher" that specifes the command line options.
> Unfortunately  I don't understand how this is specified when javac is
> linked.  -wade

javac compilations are mainly controlled through

- make/common/SetupJavaCompilers.gmk

but also see:

- make/common/JavaCompilation.gmk
- make/CompileJavaModules.gmk

You can either adjust the flags you pass into the calls (from various 
makefiles) defined in SetupJavaCompilers or you can edit the FLAGS 
definitions in there directly e.g. to add -J-Xms16m

Also look at the definition for JAVA_TOOL_FLAGS_SMALL.

PS. The above are for new JDK 10 repo layout. For 9 it is probably in 
jdk/make.

HTH

David




More information about the build-dev mailing list