Hi,
What happens if I exceed the atom table limit, and how would I know?
i am doing some code generation, which dynamically create maybe
2000~3000 new atoms (which are reused for later). Would that go over
the limit?
Anyway, it seems that the shell goes into a loop. The function that
does the generation would return properly, but I don't get the prompt
back...
it works fine for smaller test cases, so I am suspecting it might have
something to do with the atom table limit. Can somebody help me to
find out more?
Howard
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
> Hi,
>
> What happens if I exceed the atom table limit, and
> how would I know?
Why not try it? For example,
atom_killer() -> atom_killer(0).
atom_killer(N) ->
list_to_atom(integer_to_list(N)),
atom_killer(N+1).
(Running that on my mac gave a bus error and a crash
dump.)
> i am doing some code generation, which dynamically
> create maybe
> 2000~3000 new atoms (which are reused for later).
> Would that go over
> the limit?
No, the max number is 1048576.
http://www.erlang.org/doc/efficiency_guide/advanced.html
You can also see the amount of memory used for
different purposes with erlang:memory/1, for instance
erlang:memory(atom_used).
Best,
Thomas
I have made a small correction, so that there will be
a controlled termination of the emulator if the allowed
number of atoms is exhausted. (That is, there will not
be a bus error, and the crash dump will not be truncated.)
The correction will be included R12B-3.
/Bjorn
--
Björn Gustavsson, Erlang/OTP, Ericsson AB