[erlang-questions] Crash on alloc

Francesco Cesarini (Erlang Training and Consulting) francesco@REDACTED
Fri Feb 6 19:39:14 CET 2009


What it fails to allocate does not include the memory which has already 
been allocated. Memory is allocated when needed... And as Erlang lacks 
Lazy evaluation*, this is the result when dealing with large data 
structures.

Francesco

* You can simulate lazy evaluations using Funs.
--
http://www.erlang-consulting.com

Imre Palik wrote:
> Feladó: Francesco Cesarini (Erlang Training and Consulting) [francesco@REDACTED]
>   
>> This is the standard behaviour when the VM runs out of memory.... Try
>> generating smaller lists or adding more memory to your computer.
>>     
>
> I have 3 Gigs, and as far as I can see, this fails on an alloc of less then 400 Megs. Does this quite reliably, even as the first command of the shell.
>
>
>   
>> Imre Palik wrote:
>>     
>>> Hi,
>>>
>>> can anybody explain why I'm getting this:
>>>
>>> 3> {lists:seq(3, 40000000, 2), lists:seq(3, 40000000, 2)}.
>>>
>>> Crash dump was written to: erl_crash.dump
>>> eheap_alloc: Cannot allocate 373662860 bytes of memory (of type "heap").
>>>
>>> This application has requested the Runtime to terminate it in an unusual way.
>>> Please contact the application's support team for more information.
>>>
>>> Process inferior-erlang finished
>>>       



More information about the erlang-questions mailing list