[erlang-questions] atom table limit & erlang shell

Robert Virding rvirding@REDACTED
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
it.

My code:

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

Printed 947000 before it crashes.

Robert


2008/5/24 Howard Yeh <hayeah@REDACTED>:

> 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-questions@REDACTED
> 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.htm>


More information about the erlang-questions mailing list