--- a/hotspot/src/share/vm/memory/universe.cpp Mon Mar 11 02:24:01 2013 -0700
+++ b/hotspot/src/share/vm/memory/universe.cpp Tue Mar 12 08:33:57 2013 +0100
@@ -885,6 +885,8 @@
// the actual alignment depends on its size.
Universe::set_class_metaspace_size(align_size_up(ClassMetaspaceSize, alignment));
size_t total_reserved = align_size_up(heap_size + Universe::class_metaspace_size(), alignment);
+ assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())),
+ "heap size is too big for compressed oops");
char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop);
ReservedHeapSpace total_rs(total_reserved, alignment, UseLargePages, addr);