Severe memory leak problem

Daniel Neri dne@REDACTED
Sat Sep 23 15:22:49 CEST 2000


Brian Bisaillon <bbisaillon@REDACTED> writes:

> It even looks like all the variables are reinitialized in my program
> with every tail recursive call. I don't understand why it keeps
> sucking up more memory.

Your receive_packet/2 function is unfortunately *not*
tail-recursive. A tail call has to be the "last" call, and in this
case it is not (e.g. a call to parse_clientcmds/2 follows it). See
also 
        http://www.erlang.se/doc/programming_rules.shtml#HDR20


Best wishes,
   --Daniel

-- 
Daniel Neri
dne@REDACTED



More information about the erlang-questions mailing list