<div dir="ltr">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.<div><br></div><div>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.</div><div><br></div><div>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. :)</div><div><br></div><div>// Björn-Egil</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-27 16:19 GMT+02:00 Håkan Mattsson <span dir="ltr"><<a href="mailto:hawk.mattsson@gmail.com" target="_blank">hawk.mattsson@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br>I am trying to compile a <div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">​(​</div>big<div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">​)​</div> module from a list of forms<div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">​​</div>, but it seems<div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">​ like the compiler internally generates lots of new atoms:​</div><br><br><div style="margin-left:40px">no more index entries in atom_tab (max=1048576)<br><br>Crash dump is being written to: erl_crash.dump...<br></div><br><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">​In this case the compiler itself generated ​more than 300K atoms while compiling my forms.<br></div>​<br><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">​Why is the atoms generated?​</div><br><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">​Is this anything that can be disabled?​</div><span class="HOEnZb"><font color="#888888"><br>/Håkan<br><br></font></span></div>
<br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>