--- a/hotspot/src/share/vm/memory/universe.cpp Mon Jul 27 14:05:55 2015 -0400
+++ b/hotspot/src/share/vm/memory/universe.cpp Mon Jul 27 13:56:26 2015 -0700
@@ -56,6 +56,7 @@
#include "prims/jvmtiRedefineClassesTrace.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.inline.hpp"
+#include "runtime/commandLineFlagConstraintList.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/fprofiler.hpp"
#include "runtime/handles.inline.hpp"
@@ -656,6 +657,11 @@
Metaspace::global_initialize();
+ // Checks 'AfterMemoryInit' constraints.
+ if (!CommandLineFlagConstraintList::check_constraints(CommandLineFlagConstraint::AfterMemoryInit)) {
+ return JNI_EINVAL;
+ }
+
// Create memory for metadata. Must be after initializing heap for
// DumpSharedSpaces.
ClassLoaderData::init_null_class_loader_data();