OSDN Git Service

Fail early rather than crippling the GC if -Xms == -Xmx.
authorElliott Hughes <enh@google.com>
Wed, 22 Sep 2010 21:09:07 +0000 (14:09 -0700)
committerElliott Hughes <enh@google.com>
Wed, 22 Sep 2010 21:26:47 +0000 (14:26 -0700)
We should revert this when the bug is fixed.

Bug: 2714377
Change-Id: Ie3600ef60fea5e4e5988680042c7e2e595bdc622

vm/Init.c

index 90cc87c..cc5cd94 100644 (file)
--- a/vm/Init.c
+++ b/vm/Init.c
@@ -1002,8 +1002,11 @@ static int dvmProcessOptions(int argc, const char* const argv[],
         }
     }
 
-    if (gDvm.heapSizeStart > gDvm.heapSizeMax) {
-        dvmFprintf(stderr, "Heap start size must be <= heap max size\n");
+    /* We should be able to cope with these being equal, but until
+     * http://b/2714377 is fixed, we can't.
+     */
+    if (gDvm.heapSizeStart >= gDvm.heapSizeMax) {
+        dvmFprintf(stderr, "Heap start size must be < heap max size\n");
         return -1;
     }