--- old/src/hotspot/share/runtime/arguments.cpp 2018-06-27 09:09:20.989001108 +0200 +++ new/src/hotspot/share/runtime/arguments.cpp 2018-06-27 09:09:20.727989793 +0200 @@ -3900,13 +3900,13 @@ jint result = set_ergonomics_flags(); if (result != JNI_OK) return result; - set_shared_spaces_flags(); - // Set heap size based on available physical memory set_heap_size(); GCConfig::arguments()->initialize(); + set_shared_spaces_flags(); + // Initialize Metaspace flags and alignments Metaspace::ergo_initialize();