A good start when programming efficiently is to know how much memory different data top 10 binary option and operations require. It is implementation-dependent how much memory the Erlang data types and other items consume, but the following table shows some figures for the erts-8. The unit of measurement is memory words.
There exists both a 32-bit and a 64-bit implementation. A word is therefore 4 bytes or 8 bytes, respectively. An atom refers into an atom table, which also consumes memory. The atom text is stored once for each unique atom in this table. The atom table is not garbage-collected. 8 due to the probabilistic nature of the internal HAMT data structure. 5 words for a process identifier from another node.
A process identifier refers into a process table and a node table, which also consumes memory. 5 words for a port identifier from another node. A port identifier refers into a port table and a node table, which also consumes memory. 7 words for a reference from another node.
6 words for a reference from another node. A reference refers into a node table, which also consumes memory. A fun refers into a fun table, which also consumes memory. 338 words when spawned, including a heap of 233 words. The Erlang language specification puts no limits on the number of processes, length of atoms, and so on. However, for performance and memory saving reasons, there will always be limits in a practical implementation of the Erlang language and execution environment.
The maximum number of simultaneously alive Erlang processes is by default 262,144. This limit can be configured at startup. Y on X, or if X and Y are connected. All data concerning remote nodes, except for the node name atom, are garbage-collected. By default, the maximum number of atoms is 1,048,576.
In the 32-bit implementation of Erlang, 536,870,911 bytes is the largest binary that can be constructed or matched using the bit syntax. In the 64-bit implementation, the maximum size is 2,305,843,009,213,693,951 bytes. This limit is enforced starting in R11B-4. OTP releases, operations on too large binaries in general either fail or give incorrect results. The node name is used as an atom within the system, so the maximum size of 255 holds also for the node name. The maximum number of simultaneously open Erlang ports is often by default 16,384.
Each scheduler thread has its own set of references, and all other threads have a shared set of references. If a scheduler thread create a new reference each nano second, references will at earliest be reused after more than 584 years. That is, for the foreseeable future they are unique enough. If a unique integer is created each nano second, unique integers will at earliest be reused after more than 584 years. IQ Option is a regulated and award-winning online broker that enables customers to trade a wide range of instruments and underlying assets.