[erlang-questions] Early Out of Memory

Vance Shipley vances@REDACTED
Fri Mar 1 07:09:15 CET 2013


In the pathological example below why is eheap_alloc failing to
allocate 1.4GB of memory on a system with many more gigabytes of
memory available?


Erlang R16B (erts-5.10.1) [source] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.1  (abort with ^G)
1> F = fun(F, Acc) -> F(F, [lists:seq(1,1000) | Acc]) end.
#Fun<erl_eval.12.17052888>
2> F(F, []).
beam.smp(73592,0xb039d000) malloc: *** mmap(size=549453824) failed (error code=12)
  *** error: can't allocate region
                                  *** set a breakpoint in malloc_error_break to debug
     beam.smp(73592,0xb039d000) malloc: *** mmap(size=1139802112) failed (error code=12)
        *** error: can't allocate region
                                        *** set a breakpoint in malloc_error_break to debug
           beam.smp(73592,0xb039d000) malloc: *** mmap(size=1367343104) failed (error code=12)
              *** error: can't allocate region
                                              *** set a breakpoint in malloc_error_break to debug
                 beam.smp(73592,0xb039d000) malloc: *** mmap(size=1367343104) failed (error code=12)
                    *** error: can't allocate region
                                                    *** set a breakpoint in malloc_error_break to debug
                       beam.smp(73592,0xb039d000) malloc: *** mmap(size=1366781952) failed (error code=12)
                          *** error: can't allocate region
                                                          *** set a breakpoint in malloc_error_break to debug
                             beam.smp(73592,0xb039d000) malloc: *** mmap(size=1366781952) failed (error code=12)
                                *** error: can't allocate region
                                                                *** set a breakpoint in malloc_error_break to debug

Crash dump was written to: erl_crash.dump
eheap_alloc: Cannot allocate 1366780092 bytes of memory (of type "heap").
Abort trap: 6


-- 
	-Vance



More information about the erlang-questions mailing list