diff options
author | Julien Barbot <[email protected]> | 2010-01-29 11:31:15 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-02-02 15:47:18 +0100 |
commit | 489577676f14d5ee62459f9134095d982a08e430 (patch) | |
tree | 6a9b01cfecf792b0e9577ca95cde7f87a30cc947 /erts/emulator/beam/atom.h | |
parent | 085012b1ac9251d1cbd821f8b28034072fba63c3 (diff) | |
download | otp-489577676f14d5ee62459f9134095d982a08e430.tar.gz otp-489577676f14d5ee62459f9134095d982a08e430.tar.bz2 otp-489577676f14d5ee62459f9134095d982a08e430.zip |
Add the +t emulator option to change the maximum number of atoms
It is now possible to increase or decrease the maximum number of atoms
the VM can handle. The default value is 1048576 (1024*1024).
Diffstat (limited to 'erts/emulator/beam/atom.h')
-rw-r--r-- | erts/emulator/beam/atom.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/atom.h b/erts/emulator/beam/atom.h index e7e0dc440d..c10218e431 100644 --- a/erts/emulator/beam/atom.h +++ b/erts/emulator/beam/atom.h @@ -28,6 +28,17 @@ #define MAX_ATOM_LENGTH 255 #define ATOM_LIMIT (1024*1024) +#define MIN_ATOM_TABLE_SIZE 8192 + +#ifndef ARCH_32 +/* Internal atom cache needs MAX_ATOM_TABLE_SIZE to be less than an + unsigned 32 bit integer. See external.c(erts_encode_ext_dist_header_setup) + for more details. */ +#define MAX_ATOM_TABLE_SIZE ((MAX_ATOM_INDEX + 1 < (1UL << 32)) ? MAX_ATOM_INDEX + 1 : (1UL << 32)) +#else +#define MAX_ATOM_TABLE_SIZE (MAX_ATOM_INDEX + 1) +#endif + /* * Atom entry. |