[zeromq-dev] Do Sockets free memory after..

Pieter Hintjens pieterh at gmail.com
Thu May 16 19:06:11 CEST 2013


On May 16, 2013 4:07 PM, "Nishant Mittal" <nmittal at rblt.com> wrote:
>
> storing say a million msgs in its outgoing buffer and when the client has finally caught up and consumed all msgs?
>
> I am seeing that the memory usage goes up as the client is slow or not there but even after the client comes back and consumes all msgs.. the memory stays where it was.. any comments?
>

First, libzmq does not leak memory, that is certain. Second, your
application can leak memory if it does not e.g. close messages after
processing them. But then you would see a steady climb ending in
out-of-memory. What is plausible is that the shown memory usage is not
in fact allocated memory, but reserved memory.

You can test this trivially.

-Pieter



More information about the zeromq-dev mailing list