libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Memory leak and global variables


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Memory leak and global variables
Date: Fri, 29 Aug 2014 19:42:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0

Are you sure the memory is leaked? I suspect malloc simply doesn't
return the pages to the OS (no sbrk() call to shrink the heap) or you
have a minor case of memory fragmentation (totally normal).  This is
almost certainly the case if you are using 'top' to view memory
consumption: a process's heap does not shrink from the peak consumption
if you just have a minor reduction in heap size and/or have some
fragmentation.

To really analyze leaks, you should use valgrind.  If valgrind does not
show a problem, your issue is not a memory leak.

Happy hacking!

Christian

On 08/28/14 20:54, Nicolas Mora wrote:
> 
> 
> I fixed a lot of small problems thanks to your answers, but the memory
> leaks are still here with the same conditions: about 20kb is lost each
> time I call the 6 main webservices simultaneously with jquery, but no
> leak at all when I call each webservice on by one.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]