summaryrefslogtreecommitdiffstats
path: root/vm/Init.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2010-09-22 14:09:07 -0700
committerElliott Hughes <enh@google.com>2010-09-22 14:26:47 -0700
commit8b2c3e841d57e7d0136b570193585edf9a77f7d8 (patch)
tree49945a7712960eed64c3619507667b337cb1ade9 /vm/Init.c
parentbd74b4b51f16e200854e41bbbe5ee6afb3af4cff (diff)
downloadandroid_dalvik-8b2c3e841d57e7d0136b570193585edf9a77f7d8.tar.gz
android_dalvik-8b2c3e841d57e7d0136b570193585edf9a77f7d8.tar.bz2
android_dalvik-8b2c3e841d57e7d0136b570193585edf9a77f7d8.zip
Fail early rather than crippling the GC if -Xms == -Xmx.
We should revert this when the bug is fixed. Bug: 2714377 Change-Id: Ie3600ef60fea5e4e5988680042c7e2e595bdc622
Diffstat (limited to 'vm/Init.c')
-rw-r--r--vm/Init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vm/Init.c b/vm/Init.c
index 90cc87cf9..cc5cd94d4 100644
--- 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;
}