[zeromq-dev] PUB-SUB mode doesn't free the memory immediately on Linux

Martin Sustrik sustrik at 250bpm.com
Fri Feb 4 20:37:34 CET 2011


On 02/04/2011 08:28 PM, Henry Tan wrote:

> On the system monitor, the accumulated memory is freed gradually. This
> is another strange behavior. Why it is doesn't free them all at once.
> Looks like the published messages is cached and not freed in time.

So, what you are saying is that messages are passed and then memory is 
deallocated within next couple of minutes, right?

If so, it's probably not caused by 0MQ itself. There's no such thing as 
garbage collector in 0MQ. All the memory is freed immediately -- or 
maybe never -- in case there's a memory leak.

Delayed deallocation of memory looks more like there's a background 
garbage collection going on in the OS.

Martin



More information about the zeromq-dev mailing list