[erlang-questions] Dynamically generated atoms get reused if they are the same?

Kostis Sagonas <>
Mon Nov 5 23:35:06 CET 2007


 wrote:
> Hi,
> 
> According to http://www.erlang.org/doc/efficiency_guide/bif.html#6.1 atoms do not get garbage collected. Meaning if you constantly produce atoms by using list_to_atom/1 you sooner or later will run out of space for them.
> 
> Now I just wrote a small test program which indicates that as long as you produce the same atom, it will not take up additional space:
>
> So, can anyone confirm, is it correct that dynamically generated Atoms are of no concern as long as you do not produce too many _different_ ones?

Yes, of course.

Kostis



More information about the erlang-questions mailing list