--- old/src/hotspot/share/runtime/arguments.cpp 2018-10-05 11:11:24.295987700 -0700 +++ new/src/hotspot/share/runtime/arguments.cpp 2018-10-05 11:11:23.448935300 -0700 @@ -2068,6 +2068,19 @@ log_warning(arguments) ("NUMA support for Heap depends on the file system when AllocateHeapAt option is used.\n"); } } + + if(!FLAG_IS_DEFAULT(AllocateHeapAt) && !FLAG_IS_DEFAULT(AllocateOldGenAt)) { + jio_fprintf(defaultStream::error_stream(), + "AllocateHeapAt and AllocateOldGenAt cannot be used together.\n"); + status = false; + } + + if (!FLAG_IS_DEFAULT(AllocateOldGenAt) && (UseSerialGC || UseConcMarkSweepGC || UseEpsilonGC || UseZGC)) { + jio_fprintf(defaultStream::error_stream(), + "AllocateOldGenAt not supported for selected GC.\n"); + status = false; + } + return status; }