aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/atom.h
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-02-03 10:36:00 +0000
committerErlang/OTP <[email protected]>2010-02-03 10:36:00 +0000
commitb431080a98aa625758e41989437219357392ffb6 (patch)
tree73e598272c827055e015e3465451cf37e7a6b5a2 /erts/emulator/beam/atom.h
parent05f4ff85cb00b15b07b1ed194185fd37017ce7b9 (diff)
parent489577676f14d5ee62459f9134095d982a08e430 (diff)
downloadotp-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/atom.h')
-rw-r--r--erts/emulator/beam/atom.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/erts/emulator/beam/atom.h b/erts/emulator/beam/atom.h
index e7e0dc440d..cb245a87b1 100644
--- a/erts/emulator/beam/atom.h
+++ b/erts/emulator/beam/atom.h
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1996-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1996-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
@@ -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.