aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/atom.c
AgeCommit message (Collapse)Author
2019-05-14Merge branch 'john/erts/fix-xxx_to_existing_atom-overflow/ERL-944/OTP-15819' ↵John Högberg
into maint * john/erts/fix-xxx_to_existing_atom-overflow/ERL-944/OTP-15819: erts: Fix buffer overflow in xxx_to_existing_atom
2019-05-13erts: Fix buffer overflow in xxx_to_existing_atomJohn Högberg
2018-10-26Inline erts_cmpJohn Högberg
This greatly increases the performance of '--'/2 which does a lot of term comparisons.
2018-06-18Update copyright yearHenrik Nord
2018-03-09Always use sys_memcpy/cmp/etc instead of plain memcpy/cmp/etcJohn Högberg
2017-09-01Merge branch 'maint'Sverker Eriksson
2017-09-01Merge branch 'sverker/20/binary_to_atom-utf8-crash/ERL-474/OTP-14590' into maintSverker Eriksson
* sverker/20/binary_to_atom-utf8-crash/ERL-474/OTP-14590: erts: Fix crash in binary_to_atom/term for invalid utf8
2017-08-30Merge tag 'OTP-20.0' into sverker/20/binary_to_atom-utf8-crash/ERL-474/OTP-14590Sverker Eriksson
2017-08-30Merge tag 'OTP-19.0' into sverker/19/binary_to_atom-utf8-crash/ERL-474/OTP-14590Sverker Eriksson
2017-08-30erts: Fix crash in binary_to_atom/term for invalid utf8Sverker Eriksson
such as a sub-binary, of a correct utf8 string, that ends in the middle of a character.
2017-07-17erts: Replace usage of all erts_smp prefixes to just ertsLukas Larsson
2017-07-17erts: Remove ERTS_SMP and USE_THREAD definesLukas Larsson
This refactor was done using the unifdef tool like this: for file in $(find erts/ -name *.[ch]); do unifdef -t -f defile -o $file $file; done where defile contained: #define ERTS_SMP 1 #define USE_THREADS 1 #define DDLL_SMP 1 #define ERTS_HAVE_SMP_EMU 1 #define SMP 1 #define ERL_BITS_REENTRANT 1 #define ERTS_USE_ASYNC_READY_Q 1 #define FDBLOCK 1 #undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT #define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0 #define ERTS_POLL_USE_WAKEUP_PIPE 1 #define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1 #undef ERTS_HAVE_PLAIN_EMU #undef ERTS_SIGNAL_STATE
2017-07-06Allow toggling lock counting at runtimeJohn Högberg
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and all categories are still enabled by default, but the actual counting can be toggled at will. OTP-13170
2017-01-30Add new AtU8 beam chunkJosé Valim
The new chunk stores atoms encoded in UTF-8. beam_lib has also been modified to handle the new 'utf8_atoms' attribute while the 'atoms' attribute may be a missing chunk from now on. The binary_to_atom/2 BIF can now encode any utf8 binary with up to 255 characters. The list_to_atom/1 BIF can now accept codepoints higher than 255 with up to 255 characters (thanks to Björn Gustavsson).
2016-11-29erts: Add erts internal secret atomSverker Eriksson
2016-11-22Merge branch 'maint'Sverker Eriksson
2016-11-17erts: Refactor crash dumping with cbprintfSverker Eriksson
Instead of passing around a file descriptor use a function pointer to facilitate more advanced backend write logic such as size limitation or compression.
2016-10-13Add system_info(atom_limit)Gabriele Santomaggio
Add system_info(atom_limit) to provide a way to retrieve the maximum number of atoms allowed. Add tests and documentation for it too. Also split system_info_SUITE:start_node/2 to start_node_ets/2 and start_node_atm/2 to avoid code duplication.
2016-03-15update copyright-yearHenrik Nord
2016-02-15Avoid erts_cmp jump in atom, int and float comparisonsJosé Valim
Given the function definition below: check(X) when X >= 0, X <= 20 -> true. @nox has originally noticed that perfoming lt and ge guard tests were performing slower than they should be. Further investigation revealed that most of the cost was in jumping to the erts_cmp function. This patch brings the operations already inlined in erts_cmp into the emulator, removing the jump cost. After applying these changes, invoking the check/1 function defined above 30000 times with different values from 0 to 20 has fallen from 367us to 213us (measured as average of 3 runs). This is a considerably improvement over Erlang 18 which takes 556us on average. Floats have also dropped their time from 1126us (on Erlang 18) to 613us.
2015-12-15erts: Refactor out erts functions from hashLukas Larsson
2015-06-18Change license text to APLv2Bruce Yinhe
2013-02-19erts: Fix atom hash for latin1 charactersBjörn-Egil Dahlberg
Non ASCII latin1 characters were hashed as utf8 which breaks compatability.
2013-01-28Merge branch 'sverk/enc_atom-opt'Sverker Eriksson
* sverk/enc_atom-opt: erts: Optimize atom encoding to use memcpy for pure ascii erts: Refactor erts_atom_get to use ErtsAtomEncoding
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25erts: Refactor erts_atom_get to use ErtsAtomEncodingSverker Eriksson
instead of 'is_latin1' boolean argument.
2013-01-16UTF-8 support for distributionRickard Green
2013-01-08erts: Change internal representation of atoms to utf8Sverker Eriksson
2011-06-14Use new atomic API in runtime systemRickard Green
All uses of the old deprecated atomic API in the runtime system have been replaced with the use of the new atomic API. In a lot of places this change imply a relaxation of memory barriers used.
2010-09-08Re-enable spin wait on ethreads rwlocksRickard Green
Spin wait on most ethread rwlocks used by the runtime system was unintentionally disabled during development. Spin wait has now been enabled again. This bug appeared in commit 59ee2a593090e7d53c97ceba63cbd300d1b9657e, i.e., it has not been seen in any released versions.
2010-08-10Rewrite ethread libraryRickard Green
Large parts of the ethread library have been rewritten. The ethread library is an Erlang runtime system internal, portable thread library used by the runtime system itself. Most notable improvement is a reader optimized rwlock implementation which dramatically improve the performance of read-lock/read-unlock operations on multi processor systems by avoiding ping-ponging of the rwlock cache lines. The reader optimized rwlock implementation is used by miscellaneous rwlocks in the runtime system that are known to be read-locked frequently, and can be enabled on ETS tables by passing the `{read_concurrency, true}' option upon table creation. See the documentation of `ets:new/2' for more information. The ethread library can now also use the libatomic_ops library for atomic memory accesses. This makes it possible for the Erlang runtime system to utilize optimized atomic operations on more platforms than before. Use the `--with-libatomic_ops=PATH' configure command line argument when specifying where the libatomic_ops installation is located. The libatomic_ops library can be downloaded from: http://www.hpl.hp.com/research/linux/atomic_ops/ The changed API of the ethread library has also caused modifications in the Erlang runtime system. Preparations for the to come "delayed deallocation" feature has also been done since it depends on the ethread library. Note: When building for x86, the ethread library will now use instructions that first appeared on the pentium 4 processor. If you want the runtime system to be compatible with older processors (back to 486) you need to pass the `--enable-ethread-pre-pentium4-compatibility' configure command line argument when configuring the system.
2010-02-03Merge branch 'jb/atom-table-size' into ccase/r13b04_devErlang/OTP
* 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.)
2010-02-02Add the +t emulator option to change the maximum number of atomsJulien Barbot
It is now possible to increase or decrease the maximum number of atoms the VM can handle. The default value is 1048576 (1024*1024).
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP