hotspot/src/share/vm/memory/filemap.cpp
changeset 33628 09241459a8b8
parent 33148 68fa8b6c4340
child 34659 3a7071043457
--- a/hotspot/src/share/vm/memory/filemap.cpp	Mon Nov 02 12:34:27 2015 +0000
+++ b/hotspot/src/share/vm/memory/filemap.cpp	Tue Nov 03 09:41:03 2015 +0100
@@ -168,6 +168,7 @@
   _version = _current_version;
   _alignment = alignment;
   _obj_alignment = ObjectAlignmentInBytes;
+  _compact_strings = CompactStrings;
   _narrow_oop_mode = Universe::narrow_oop_mode();
   _narrow_oop_shift = Universe::narrow_oop_shift();
   _max_heap_size = MaxHeapSize;
@@ -900,6 +901,13 @@
                   _obj_alignment, ObjectAlignmentInBytes);
     return false;
   }
+  if (_compact_strings != CompactStrings) {
+    FileMapInfo::fail_continue("The shared archive file's CompactStrings setting (%s)"
+                  " does not equal the current CompactStrings setting (%s).",
+                  _compact_strings ? "enabled" : "disabled",
+                  CompactStrings   ? "enabled" : "disabled");
+    return false;
+  }
 
   return true;
 }