< prev index next >

test/gc/TestSmallHeap.java

Print this page

        

@@ -41,18 +41,22 @@
  * minimal heap size of 2m but on Solaris/Sparc we have a page size of 8k and
  * get a minimal heap size of 4m. And on platforms where the page size is 64k
  * we get a minimal heap size of 32m. We never use large pages for the card table.
  *
  * There is also no check in the VM for verifying that the maximum heap size
- * is larger than the supported minimal heap size. This means that specifying
- * -Xmx1m on the command line is fine but will give a heap of 2m (or 4m or 32m).
+ * is larger than the supported minimal heap size.
  *
- * To work around these rather strange behaviors this test uses -Xmx2m but then
+ * To work around these rather strange behaviors this test uses -Xmx4m but then
  * calculates what the expected heap size should be. The calculation is a
  * simplified version of the code in the VM. We assume that the card table will
  * use one page. Each byte in the card table corresponds to 512 bytes on the heap.
  * So, the expected heap size is page_size * 512.
+ *
+ * There is no formal requirement for the minimal value of the maximum heap size
+ * the VM should support. In most cases the VM could start with -Xmx2m.
+ * But with 2m limit GC could be triggered before VM initialization completed.
+ * Therefore, the positive checks start the VM with -Xmx4m as minimum. 
  */
 
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
< prev index next >