hotspot/src/share/vm/memory/universe.cpp
changeset 31995 aa4049b4184a
parent 31592 43f48e165466
child 32375 b84c2d16ba53
child 33967 c500568a6ecf
--- 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();