Skip to content

Commit

Permalink
Atom and AtU8 chunks in beam_modules
Browse files Browse the repository at this point in the history
Clarify that the chunk in which atoms are stored is either Atom or AtU8, depending
on the source file encoding.
  • Loading branch information
ramkumarr authored and happi committed Oct 3, 2018
1 parent 122b558 commit ccd9f53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chapters/beam_modules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Here we can see the chunk names that beam uses.

==== Atom table chunk

The chunk named `Atom` is mandatory and contains all atoms referred to by the module. The format of the atom chunk is:
Either the chunk named `Atom` or the chunk named `AtU8` is mandatory. It contains all atoms referred to by the module. For source files with `latin1` encoding, the chunk named `Atom` is used. For `utf8` encoded modules, the chunk is named `AtU8`. The format of the atom chunk is:

[source,erlang]
----
Expand All @@ -101,6 +101,8 @@ AtomChunk = <<
----

The format of the AtU8 chunk is the same as above, except that the name of the chunk is `AtU8`.


NOTE: Module name is always stored as the first atom in the table (atom index 0).

Expand Down

0 comments on commit ccd9f53

Please sign in to comment.