diff options
author | Sverker Eriksson <[email protected]> | 2015-12-08 18:45:32 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-12-09 20:18:17 +0100 |
commit | 343f461a2810ce3440b1d7c55cda996038071d87 (patch) | |
tree | fd762742b6995ce7eec50a2d9714a844533d3807 /erts/emulator/beam/erl_init.c | |
parent | c97f3332aeddf039ee2207196229b9ff07047c72 (diff) | |
download | otp-343f461a2810ce3440b1d7c55cda996038071d87.tar.gz otp-343f461a2810ce3440b1d7c55cda996038071d87.tar.bz2 otp-343f461a2810ce3440b1d7c55cda996038071d87.zip |
erts: Optimize hashing in process dictionary
by limiting table sizes to powers of 2.
This will change the default size from 10 to 8.
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r-- | erts/emulator/beam/erl_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index d9c3b0dcf4..0a34d91a01 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -197,7 +197,7 @@ Uint32 verbose; /* See erl_debug.h for information about verbose */ int erts_atom_table_size = ATOM_LIMIT; /* Maximum number of atoms */ -int erts_pd_initial_size = 10; +int erts_pd_initial_size = 8; /* must be power of 2 */ int erts_modified_timing_level; @@ -1479,7 +1479,7 @@ erl_start(int argc, char **argv) VERBOSE(DEBUG_SYSTEM, ("using minimum heap size %d\n", H_MIN_SIZE)); } else if (has_prefix("pds", sub_param)) { arg = get_arg(sub_param+3, argv[i+1], &i); - if ((erts_pd_initial_size = atoi(arg)) <= 0) { + if (!erts_pd_set_initial_size(atoi(arg))) { erts_fprintf(stderr, "bad initial process dictionary size %s\n", arg); erts_usage(); } |