Erlang/Windows stabilty - a newbie question.
Michael McDaniel
erlang@REDACTED
Sun Mar 26 21:05:19 CEST 2006
using R10B-10 on my Linux box (1.6Ghz/512MB) I get
Crash dump was written to: erl_crash.dump
eheap_alloc: Cannot allocate 912262800 bytes of memory (of type "heap").
I will guess you are having same issue though with a less useful message.
It appears to me that the heap is not getting recovered between
repeated executions of the program. I thought that binary objects
got recovered; someone else perhaps can explain?
Anyway, I can run repeatedly from the command line with no problems
using the command:
erl -s testtokens start -s erlang halt
~Michael
On Sun, Mar 26, 2006 at 07:53:46PM +0200, kaslist wrote:
> Hi,
>
> This is my first post to the the list - I've been coding for about
> twenty-five years... but currently I'm an Erlang newbie :)
>
> At the moment, I'm having a bit of a problem with program stability
> using Erlang and I wondered if anyone here could help. I'm using
> R10B-10 on WinXP (2GHz/1GbRAM) and I've narrowed the issue to the
> following code which I've wrapped in a simple module to demonstrate:
>
>
> -module(testtokens).
>
> -export([start/0]).
>
> start() ->
> erlang:display(time()),
> FILENAME = "test.txt",
> case file:read_file(FILENAME) of
> {ok, Data} ->
> TESTSTRING = binary_to_list(Data);
> {error, Reason} ->
> TESTSTRING = ""
> end,
>
> string:tokens(TESTSTRING, " "),
> time().
>
>
> The code is intended to load a file, convert it to a string and then
> split the loaded string. To test Erlang under pressure - I made
> 'test.txt' - 14Mb large. When I run it repeatedly... this is what
> happens...
>
>
> Erlang (BEAM) emulator version 5.4.13 [threads:0]
>
> Eshell V5.4.13 (abort with ^G)
> 1> c(testtokens).
> ./testtokens.erl:11: Warning: variable 'Reason' is unused
> {ok,testtokens}
> 2> testtokens:start().
> {19,13,40}
> {19,13,50}
> 3> testtokens:start().
> {19,13,55}
> {19,14,3}
> 4> testtokens:start().
> {19,14,7}
> {19,14,19}
> 5> testtokens:start().
> {19,14,22}
> {19,14,50}
> 6> testtokens:start().
> {19,14,53}
>
> Abnormal termination
>
>
> Every time it crashes. Thus my question is... am I doing something
> intrinsically dumb/non-erlang here.... or is it a bug? I know Erlang
> doesn't pretend to be an efficient sequential processor... but I didn't
> expect this.
>
> If you've got any advice I'd really appreciate it.
>
> Thanks,
>
> Kyle.
>
>
More information about the erlang-questions
mailing list