[erlang-questions] Tail recursion and memory leak

Peter Lemenkov lemenkov@REDACTED
Fri Mar 16 14:04:46 CET 2007


2007/3/16, Christian S <chsu79@REDACTED>:
> Yep, your erlang vm process uses all the cpu, the garbage collector is
> busy trying to hold the heap under the threshold size.

I changed things a little:

==========================

select_calls(Fd,NumberOfCalls) ->
        send_msg
(Fd,"Caller","Called","UserName","SessionID","TagTo","TagFrom","Routeto"),
        send_msg
(Fd,"Called","Caller","UserName","SessionID","TagFrom","TagTo","RouteFrom"),

        timer:sleep(100),

        select_calls(Fd,NumberOfCalls+1).

==========================

I played with sleep-time but nothing changes - memory still leaks
(with slower rate of course). All other things are the same - memory
leaks then I  triy to write a string concatenated from other strings
and variables and doesn't leak then I try to write a string
concatenated from strings.

-- 
With best regards!



More information about the erlang-questions mailing list