Merge
authorjmasa
Thu, 29 May 2014 13:01:54 -0700
changeset 24668 26512f82f5d9
parent 24665 51cb5579adb3 (current diff)
parent 24667 38c5d155aee9 (diff)
child 24680 c07894b51878
child 24843 b1022076517a
Merge
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Tue May 27 08:44:23 2014 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu May 29 13:01:54 2014 -0700
@@ -1449,7 +1449,7 @@
   return true;
 }
 
-uintx Arguments::max_heap_for_compressed_oops() {
+size_t Arguments::max_heap_for_compressed_oops() {
   // Avoid sign flip.
   assert(OopEncodingHeapMax > (uint64_t)os::vm_page_size(), "Unusual page size");
   // We need to fit both the NULL page and the heap into the memory budget, while
--- a/hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java	Tue May 27 08:44:23 2014 -0700
+++ b/hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java	Thu May 29 13:01:54 2014 -0700
@@ -26,7 +26,7 @@
  * @bug 8016479
  * @summary Verify that the heap shrinks after full GC according to the current values of the Min/MaxHeapFreeRatio flags
  * @library /testlibrary
- * @run main/othervm -XX:+UseAdaptiveSizePolicyWithSystemGC -XX:+UseParallelGC -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 -verbose:gc TestDynShrinkHeap
+ * @run main/othervm -XX:+UseAdaptiveSizePolicyWithSystemGC -XX:+UseParallelGC -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 -Xmx1g -verbose:gc TestDynShrinkHeap
  */
 import com.oracle.java.testlibrary.DynamicVMOption;
 import java.lang.management.ManagementFactory;
@@ -41,7 +41,7 @@
     public static final String MAX_FREE_RATIO_FLAG_NAME = "MaxHeapFreeRatio";
 
     private static ArrayList<byte[]> list = new ArrayList<>(0);
-    private static final int M = 1024 * 1024; // to make heap more manageable by test code
+    private static final int LEN = 512 * 1024 + 1;
 
     public TestDynShrinkHeap() {
     }
@@ -69,12 +69,12 @@
     }
 
     private void eat() {
-        for (int i = 0; i < M; i++) {
+        for (int i = 0; i < LEN; i++) {
             list.add(new byte[1024]);
         }
-        MemoryUsagePrinter.printMemoryUsage("allocated " + M + " arrays");
+        MemoryUsagePrinter.printMemoryUsage("allocated " + LEN + " arrays");
 
-        list.subList(0, M / 2).clear();
+        list.subList(0, LEN / 2).clear();
         System.gc();
         MemoryUsagePrinter.printMemoryUsage("array halved");
     }