harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r565818 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
Date Tue, 14 Aug 2007 16:08:27 GMT
Author: gshimansky
Date: Tue Aug 14 09:08:26 2007
New Revision: 565818

URL: http://svn.apache.org/viewvc?view=rev&rev=565818
Log:
Applied patch from HARMONY-4618
[drlvm][jedit] DRLVM doesn't support -ms and -mx options


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp?view=diff&rev=565818&r1=565817&r2=565818
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Tue Aug 14 09:08:26
2007
@@ -264,18 +264,18 @@
         } else if (strcmp(option, "-client") == 0 || strcmp(option, "-server") == 0) {
             p_env->VmProperties()->set("em.properties", option + 1);
 
-        } else if (begins_with(option, "-Xms")) {
-            // cut -Xms
-            const char* arg = option + 4;
+        } else if (begins_with(option, "-Xms") || begins_with(option, "-ms")) {
+            // cut -Xms || -ms
+            const char* arg = option + (begins_with(option, "-ms") ? 3 : 4);
             TRACE2("init", "gc.ms = " << arg);
             if (atoi(arg) == 0) {
                 LECHO(34, "Negative or invalid heap size. Default value will be used!");
             }
             p_env->VmProperties()->set("gc.ms", arg);
 
-        } else if (begins_with(option, "-Xmx")) {
+        } else if (begins_with(option, "-Xmx") || begins_with(option, "-mx")) {
             // cut -Xmx
-            const char* arg = option + 4;
+            const char* arg = option + (begins_with(option, "-mx") ? 3 : 4);
             TRACE2("init", "gc.mx = " << arg);
             if (atoi(arg) == 0) {
                 LECHO(34, "Negative or invalid heap size. Default value will be used!");



Mime
View raw message