<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-GB">Hello,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-GB">While
executing this program, the memory increases constantly. But, if I comment the
lines “<SPAN class=SpellE>io<SPAN class=GramE>:format</SPAN></SPAN>(…)” it
doesn’t happen (the memory stabilizes). Is this behaviour correct?
</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-GB">1>
example:start(1000).</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><?xml:namespace
prefix = o ns = "urn:schemas-microsoft-com:office:office"
/><o:p>-module(example).</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><o:p>-export([start/1,
stop/0]).</o:p></SPAN></FONT></P><FONT face=Arial color=navy size=2><SPAN
lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"><o:p>
<P class=MsoNormal><FONT color=#000000></FONT><FONT color=#000000></FONT><FONT
color=#000000></FONT><FONT color=#000000></FONT><FONT color=#000000></FONT><FONT
color=#000000></FONT><FONT color=#000000></FONT><BR>start(Cant)
-><BR> init_process(Cant),<BR>
register(?MODULE, spawn_link(fun() -> loop() end)).</P>
<P class=MsoNormal>stop() -><BR> ?MODULE !
{stop}.<BR> <BR>init_process(0) -><BR>
ok;<BR> <BR>init_process(Cant) -><BR> spawn_link(fun()
-> proc() end),<BR> init_process(Cant - 1).</P>
<P class=MsoNormal>proc() -><BR> io:fwrite("In proc~n",
[]),<BR> receive<BR> after
4000 -><BR>
io:fwrite("TimeOut~n", []),<BR>
proc()<BR> end.</P>
<P class=MsoNormal>loop() -><BR>
receive<BR> {stop}
-><BR>
io:format("Bye~n", []),<BR>
ok<BR> end.</P>
<P class=MsoNormal><FONT color=#000000>Thanks,</FONT></P>
<P class=MsoNormal><FONT color=#000000>Bernardo.</FONT></P>
<P class=MsoNormal></o:p></SPAN></FONT> </P></FONT></DIV></BODY></HTML>