hotspot/src/share/vm/memory/virtualspace.cpp
changeset 38009 290ae73980f7
parent 37984 5e9b81de0fce
child 39966 43c7f35b800e
--- a/hotspot/src/share/vm/memory/virtualspace.cpp	Wed Apr 20 16:04:38 2016 -0400
+++ b/hotspot/src/share/vm/memory/virtualspace.cpp	Thu Apr 21 09:08:33 2016 +0200
@@ -1083,6 +1083,12 @@
     test_log("test_reserved_space3(%p, %p, %d)",
         (void*)(uintptr_t)size, (void*)(uintptr_t)alignment, maybe_large);
 
+    if (size < alignment) {
+      // Tests might set -XX:LargePageSizeInBytes=<small pages> and cause unexpected input arguments for this test.
+      assert((size_t)os::vm_page_size() == os::large_page_size(), "Test needs further refinement");
+      return;
+    }
+
     assert(is_size_aligned(size, os::vm_allocation_granularity()), "Must be at least AG aligned");
     assert(is_size_aligned(size, alignment), "Must be at least aligned against alignment");