aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2009-12-15 15:06:05 +0100
committerBjörn Gustavsson <[email protected]>2010-01-13 15:35:41 +0100
commit647a2b4dac949d50e01bfd541561f1e1ec1c890c (patch)
treef66c64e4f47375182dff260cff1605e71b3229df /erts/etc/common
parent6fd44e63eadc4d167a0db9178ff200e51c3231c1 (diff)
downloadotp-647a2b4dac949d50e01bfd541561f1e1ec1c890c.tar.gz
otp-647a2b4dac949d50e01bfd541561f1e1ec1c890c.tar.bz2
otp-647a2b4dac949d50e01bfd541561f1e1ec1c890c.zip
Add min heap size start options to beam and erl
The erl (and beam) start arguments are extended with the following options: * +hms Size, sets the default minimum heap size for processes. * +hmbs Size, sets the default minimum binary virtual heap size for processes. The previous +h Size argument can still be used for backward compatibility purposes.
Diffstat (limited to 'erts/etc/common')
-rw-r--r--erts/etc/common/erlexec.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index 4325418e7c..1fc753293f 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -123,6 +123,14 @@ static char *pluss_val_switches[] = {
"ss",
NULL
};
+/* +h arguments with values */
+static char *plush_val_switches[] = {
+ "ms",
+ "mbs",
+ "",
+ NULL
+};
+
/*
* Define sleep(seconds) in terms of Sleep() on Windows.
@@ -783,7 +791,6 @@ int main(int argc, char **argv)
case 'a':
case 'A':
case 'b':
- case 'h':
case 'i':
case 'P':
case 'S':
@@ -850,6 +857,20 @@ int main(int argc, char **argv)
goto the_default;
break;
}
+ case 'h':
+ if (!is_one_of_strings(&argv[i][2], plush_val_switches)) {
+ goto the_default;
+ } else {
+ if (i+1 >= argc
+ || argv[i+1][0] == '-'
+ || argv[i+1][0] == '+')
+ usage(argv[i]);
+ argv[i][0] = '-';
+ add_Eargs(argv[i]);
+ add_Eargs(argv[i+1]);
+ i++;
+ }
+ break;
case 's':
if (!is_one_of_strings(&argv[i][2],
pluss_val_switches))
@@ -1048,7 +1069,7 @@ usage_aux(void)
#endif
"[-make] [-man [manopts] MANPAGE] [-x] [-emu_args] "
"[-args_file FILENAME] "
- "[+A THREADS] [+a SIZE] [+B[c|d|i]] [+c] [+h HEAP_SIZE] [+K BOOLEAN] "
+ "[+A THREADS] [+a SIZE] [+B[c|d|i]] [+c] [+h HEAP_SIZE_OPTION] [+K BOOLEAN] "
"[+l] [+M<SUBSWITCH> <ARGUMENT>] [+P MAX_PROCS] [+R COMPAT_REL] "
"[+r] [+s SCHEDULER_OPTION] [+S NO_SCHEDULERS:NO_SCHEDULERS_ONLINE] [+T LEVEL] [+V] [+v] [+W<i|w>] "
"[args ...]\n");