[erlang-questions] Crash during compilation
Anthony Ramine
n.oxyde@REDACTED
Wed Oct 16 11:05:42 CEST 2013
Please keep the discussion on the list, thank you.
--
Anthony Ramine
> Le 15 oct. 2013 à 20:40, Maruthavanan Subbarayan <maruthavanan_s@REDACTED> a écrit :
>
> HI,
>
> Since after I removed that the same did not occur, but for sure it occurred when I included that. The circular macro should be defined in a header file.
>
> One more note it just declaring the macro would not reproduce this, the declared macro should be used somewhere in the code like below.
>
> t.hrl
> ==================
> -define(MACRO,[[]++?MACRO]).
>
> heap_error.erl
> ===============
> -module(heap_error).
> -compile(export_all).
>
> -include("t.hrl").
>
> %-define(MACRO,["test",?MACRO]).
>
>
> function_name()->
> A=?MACRO,
> ok.
>
> > Subject: Re: [erlang-questions] Crash during compilation
> > From: n.oxyde@REDACTED
> > Date: Tue, 15 Oct 2013 18:55:19 +0200
> > CC: erlang-questions@REDACTED
> > To: maruthavanan_s@REDACTED
> >
> > Are you sure of that?
> >
> > This should error out with "circular macro 'MACRO'".
> >
> > --
> > Anthony Ramine
> >
> > Le 15 oct. 2013 à 10:40, Maruthavanan Subbarayan <maruthavanan_s@REDACTED> a écrit :
> >
> > > Hi,
> > >
> > > I think I did an accidental typo that caused because of copy paste. Took almost 6 hours of mine :) Learnt copy paste bad very bad sometimes :)
> > >
> > > Just to let community know, I was trying to do something like below.
> > >
> > > -define(MACRO, [?MACRO]).
> > >
> > > Thanks,
> > > Marutha
> > >
> > > > Subject: Re: [erlang-questions] Crash during compilation
> > > > From: n.oxyde@REDACTED
> > > > Date: Tue, 15 Oct 2013 10:25:02 +0200
> > > > CC: erlang-questions@REDACTED
> > > > To: maruthavanan_s@REDACTED
> > > >
> > > > Hello,
> > > >
> > > > Is your module quite large and uses a lot of binary patterns?
> > > >
> > > > Try erlc +time.
> > > >
> > > > --
> > > > Anthony Ramine
> > > >
> > > > Le 15 oct. 2013 à 09:27, Maruthavanan Subbarayan <maruthavanan_s@REDACTED> a écrit :
> > > >
> > > > > Hi,
> > > > >
> > > > > I am receiving and crash dump during compilation of my code, stating could not allocate memory and takes a lot time. I am able to compile other bigger modules in same environment. I passed and "-v" to put verbose of "erlc" but I could not see any output.
> > > > >
> > > > > Slogan: eheap_alloc: Cannot allocate 1098556536 bytes of memory (of type "heap").
> > > > > System version: Erlang R16B02 (erts-5.10.3) [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
> > > > >
> > > > > I tried 'rebar" as well as "erlc" how can I get more information? I am wondering what area of my code causes heap to grow during compilation? Any ideas?
> > > > >
> > > > > One more interesting fact is, one of the modules which was not changed is also facing this problem suddenly. I also tried copying the folder to Erlang-R14B04, and this also had same problem now. How should I proceed further?
> > > > >
> > > > > Thanks,
> > > > > Marutha
> > > > > _______________________________________________
> > > > > erlang-questions mailing list
> > > > > erlang-questions@REDACTED
> > > > > http://erlang.org/mailman/listinfo/erlang-questions
> > > >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131016/f1554dd6/attachment.htm>
More information about the erlang-questions
mailing list