Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
kvakvs committed Mar 26, 2024
1 parent 5d926b8 commit a6593ad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/docs/build/*
/src/*
/src/
*.iml
.idea/*
/.idea/
/docs/build/
4 changes: 2 additions & 2 deletions docs/source/eli5-atoms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ atoms operations are cheap.

BEAM loader routine reads atom values and looks them up in atom table. It
replaces atom names with their integer values, tagged as Atom
:ref:`immediate <def-immed>`. Henceforth the code manipulates immediate integer
:ref:`immediate <def-immed>`. Henceforth the code internally manipulates integer
values instead of names.

These internal values cannot leave the node (over the network or on disk) as
integers. This is because another node will have different numeric values
for atoms. Thus when leaving the node atoms are always converted to strings.
for same named atoms. Thus when leaving the node atoms are always converted to strings.
This affects BEAM files, external pids, external ports, atoms in Mnesia/DETS
and so on. This is the reason why sometimes developers prefer short atom names
for database field names — they will appear as strings in database data.
6 changes: 3 additions & 3 deletions docs/source/eli5-efficiency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Here are general rules regarding data copying and performance.
Literals (Constants)
--------------------

All Erlang values in your module (literals) are saved in the module file and
then loaded when your module loads.
All Erlang values in your module which are larger than a single machine word are called literals.
Literals are saved in the module file and then loaded when your module loads.
These values are stored in special memory area called constant pool and later
when you reload your code the garbage collector will move old constants to your
process heap (see note below, this has changed in OTP 20.0).
Expand All @@ -36,7 +36,7 @@ store large binaries in code etc.

.. note::

In Erlang versions prior to 20.0 a constant value will be copied when
In Erlang versions prior to 20.0 a constant value would be copied when
crossing process boundary (explained above in "Data Copying"). This has changed
in version 20.0
(OTP-13529 in `Release Notes <http://erlang.org/download/otp_src_20.0.readme>`_ )
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ knowledge such as VM internals, memory layout, opcodes etc.
The project is work in progress, so come back soon!
Github repository for pages https://github.com/kvakvs/beam-wisdoms

Knowledge cutoff: OTP 20

Latest
``````

Expand Down

0 comments on commit a6593ad

Please sign in to comment.