[zeromq-dev] Memory leak
Martin Sustrik
sustrik at 250bpm.com
Tue Mar 30 17:47:05 CEST 2010
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
More information about the zeromq-dev
mailing list