erlangheap-memoryerlang-shellerlang-portswxerlang

Can anyone explain this Erlang Crash dump?


I got this error report when running my Erlang application.


Crash dump was written to: erl_crash.dump

eheap_alloc: Cannot allocate 18446744071692551144 bytes of memory (of type "heap").

It's a simple program ran on a simple PC. How is it possible to get such numbers? It is trying to allocate 10^10 gb by the way. The program basically only runs tail recursion and a quite low amount of processes.


Solution

  • If you get this error while running you application that means that one of your functions are calling recursively and trying to allocate that much memory where OS would not provide to VM and hence VM crashes with that memory allocation error.