[zeromq-dev] Memory leak(?) between Push/Pull

Justin Cook jhcook at gmail.com
Thu Dec 6 15:56:11 CET 2012

On Thursday, 6 December 2012 at 14:23, Stefan de Konink wrote:
> On Thu, 6 Dec 2012, Charles Remes wrote:
> > The memory is being deallocated. Let me guess something… you are  
> > running on linux. There is a long standing and well known issue when you  
> > call free() on linux. Though you are giving the memory block back to the  
> > OS, the OS continues to "charge" your process for the space. BTW, this  
> > problem also exists on OSX to a lesser extent.
> Mmm... this will result in a nice afternoon valgrinding to check if  
> your claim make sense.

This is true with all operating systems. A process can request memory and it is allocated if available. Once allocated, the process "owns" that memory space and can do what it wants with it. All operating systems have this limitation.  

This also depends on memory block sizes and the operating system's management of memory pools…fragmentation and the like.


Justin Cook  

More information about the zeromq-dev mailing list