--- old/test/gc/TestSmallHeap.java Thu Jul 21 10:31:42 2016 +++ new/test/gc/TestSmallHeap.java Thu Jul 21 10:31:42 2016 @@ -43,14 +43,18 @@ * 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;