diff options
author | Erlang/OTP <[email protected]> | 2010-02-03 10:36:00 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-02-03 10:36:00 +0000 |
commit | b431080a98aa625758e41989437219357392ffb6 (patch) | |
tree | 73e598272c827055e015e3465451cf37e7a6b5a2 /erts/emulator/beam/erl_init.c | |
parent | 05f4ff85cb00b15b07b1ed194185fd37017ce7b9 (diff) | |
parent | 489577676f14d5ee62459f9134095d982a08e430 (diff) | |
download | otp-b431080a98aa625758e41989437219357392ffb6.tar.gz otp-b431080a98aa625758e41989437219357392ffb6.tar.bz2 otp-b431080a98aa625758e41989437219357392ffb6.zip |
Merge branch 'jb/atom-table-size' into ccase/r13b04_dev
* jb/atom-table-size:
Add the +t emulator option to change the maximum number of atoms
OTP-8405 There is a new +t emulator option for changing the maximum number
of atoms. (Thanks to Julien Barbot.)
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r-- | erts/emulator/beam/erl_init.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index bdf888eaff..17cf3b9597 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -119,6 +119,8 @@ int erts_disable_tolerant_timeofday; /* Time correction can be disabled it is * not and/or it is too slow. */ +int erts_atom_table_size = ATOM_LIMIT; /* Maximum number of atoms */ + int erts_modified_timing_level; int erts_no_crash_dump = 0; /* Use -d to suppress crash dump. */ @@ -569,6 +571,10 @@ void erts_usage(void) erts_fprintf(stderr, " schedulers online (n2), valid range for both\n"); erts_fprintf(stderr, " numbers are [1-%d]\n", ERTS_MAX_NO_OF_SCHEDULERS); + erts_fprintf(stderr, "-t size set the maximum number of atoms the " + "emulator can handle\n"); + erts_fprintf(stderr, " valid range is [%d-%d]\n", + MIN_ATOM_TABLE_SIZE, MAX_ATOM_TABLE_SIZE); erts_fprintf(stderr, "-T number set modified timing level,\n"); erts_fprintf(stderr, " valid range is [0-%d]\n", ERTS_MODIFIED_TIMING_LEVELS-1); @@ -1140,6 +1146,22 @@ erl_start(int argc, char **argv) } break; } + case 't': + /* set atom table size */ + arg = get_arg(argv[i]+2, argv[i+1], &i); + errno = 0; + erts_atom_table_size = strtol(arg, NULL, 10); + if (errno != 0 || + erts_atom_table_size < MIN_ATOM_TABLE_SIZE || + erts_atom_table_size > MAX_ATOM_TABLE_SIZE) { + erts_fprintf(stderr, "bad atom table size %s\n", arg); + erts_usage(); + } + VERBOSE(DEBUG_SYSTEM, + ("setting maximum number of atoms to %d\n", + erts_atom_table_size)); + break; + case 'T' : arg = get_arg(argv[i]+2, argv[i+1], &i); errno = 0; |