[erlang-questions] Internal compiler atoms
Sat Jul 29 15:18:22 CEST 2017
All identifiers, i.e. variables and function names, are represented as
atoms internally in the compiler. In addition to your own variables,
temporaries are also generated in core and kernel. These are also
identifiers and therefor also atoms. This means we can't really predict how
many atoms will be generated either.
And No, there is no real need for these to be represented as atoms. It
would be better if they were binaries imho. I guess the original author(s)
of the compiler never expected huge a huge number of atoms being generated.
The remedy is to rewrite the compiler internals to use binary strings
instead of atoms for identifiers. That goes for the whole chain of things,
tokinizer, parser, linter, forms, core, kernel and beam. Happy hacking. :)
2017-07-27 16:19 GMT+02:00 Håkan Mattsson <>:
> I am trying to compile a
> module from a list of forms
> , but it seems
> like the compiler internally generates lots of new atoms:
> no more index entries in atom_tab (max=1048576)
> Crash dump is being written to: erl_crash.dump...
> In this case the compiler itself generated more than 300K atoms while
> compiling my forms.
> Why is the atoms generated?
> Is this anything that can be disabled?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions