[erlang-questions] atom table limit & erlang shell

Robert Virding <>
Sat May 24 12:38:04 CEST 2008

Hi Howard,

I did a small test on my system, R12B-0 on Windows, with small loop which
just created atoms. It crashed the system when the atom table became full,
1048576 entries. Also this was the reason given in the crash dump. Why the
shell goes wrong I don't know, could be you do something else which hangs

My code:

run(N) ->
    if (N rem 1000) =:= 0 -> io:fwrite("~p\n", [N]);
       true -> ok
    case catch list_to_atom("a" ++ integer_to_list(N)) of
        A when is_atom(A) -> run(N+1);
        Other -> {Other,N}

Printed 947000 before it crashes.


2008/5/24 Howard Yeh <>:

> 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
> http://www.erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080524/0ecd7e1c/attachment.html>

More information about the erlang-questions mailing list