[zeromq-dev] Memory leak

David Greco greco at acm.org
Tue Mar 30 20:10:46 CEST 2010

Hi Martin,
ah ok, this should be the reason. So, if I slow down the send I shouldn't see the memory growing so fast, is that correct ?

On Mar 30, 2010, at 5:47 PM, Martin Sustrik wrote:

> Hi David,
>> I think I found a memory leak. You can reproduce the problem just 
>> running the local_thr and remote_thr executable under perf.
>> The memory leak is associated to the sending of messages, so just 
>> looking at the process running the remote_thr you can see that the 
>> memory grows indefinitely.
>> Any clue ?
> Can you check with valgrind? It reports no leaks on my box.
> As for the growing memory usage it may be caused by sender being faster 
> than receiver. In such a case messages are stored in the in-memory pipe 
> till they are consumed by the receiver.
> On most operating systems the memory allocated by malloc is returned to 
> the OS only when process exits. That may be the reason you don't see 
> memory usage dropping after the test is over.
> Martin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list