aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_init.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2011-12-16 13:02:09 +0100
committerRickard Green <[email protected]>2012-04-16 16:32:28 +0200
commit414f4fb8dc9a188f8148a1f92e5f9125108e170d (patch)
tree319b52ff0171a0f3bec1deb63407caaefe095ab5 /erts/emulator/beam/erl_init.c
parent3e454414a40bba082e5dc0be310f71843200dcf4 (diff)
downloadotp-414f4fb8dc9a188f8148a1f92e5f9125108e170d.tar.gz
otp-414f4fb8dc9a188f8148a1f92e5f9125108e170d.tar.bz2
otp-414f4fb8dc9a188f8148a1f92e5f9125108e170d.zip
Optimize process table access
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r--erts/emulator/beam/erl_init.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index ca4385dd3a..ead7b40679 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -614,6 +614,7 @@ early_init(int *argc, char **argv) /*
erts_printf_eterm_func = erts_printf_term;
erts_disable_tolerant_timeofday = 0;
display_items = 200;
+ erts_proc.max = ERTS_DEFAULT_MAX_PROCESSES;
erts_backtrace_depth = DEFAULT_BACKTRACE_SIZE;
erts_async_max_threads = 0;
erts_async_thread_suggested_stack_size = ERTS_ASYNC_THREAD_MIN_STACK_SIZE;
@@ -1160,7 +1161,7 @@ erl_start(int argc, char **argv)
case 'P':
/* set maximum number of processes */
Parg = get_arg(argv[i]+2, argv[i+1], &i);
- erts_max_processes = atoi(Parg);
+ erts_proc.max = atoi(Parg);
/* Check of result is delayed until later. This is because +R
may be given after +P. */
break;
@@ -1439,10 +1440,10 @@ erl_start(int argc, char **argv)
}
/* Delayed check of +P flag */
- if (erts_max_processes < ERTS_MIN_PROCESSES
- || erts_max_processes > ERTS_MAX_PROCESSES
+ if (erts_proc.max < ERTS_MIN_PROCESSES
+ || erts_proc.max > ERTS_MAX_PROCESSES
|| (erts_use_r9_pids_ports
- && erts_max_processes > ERTS_MAX_R9_PROCESSES)) {
+ && erts_proc.max > ERTS_MAX_R9_PROCESSES)) {
erts_fprintf(stderr, "bad number of processes %s\n", Parg);
erts_usage();
}