cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl in a comet connection

From: B <redmaple_at_nifty.com>
Date: Fri, 4 Mar 2011 23:12:53 +0900

Hello guys,

I resolved the problem.

It is caused due to a bug in my source that failed to free a libxml parser context.
I used libxml to parse received data, and I used xmlClearParserCtxt when a message process is done, which seems to only free a part of memory and reset it to be reused by another parsing.
I changed xmlClearParserCtxt from xmlFreeParserCtxt and the memory usage didn't increase again.

thank you very much.

rgds,

chou

On 2011/03/04, at 22:43, Dirk Manske wrote:

>> It seems that all the received data was cached in memory by libcurl,
>> and the data will not be freed untill the curl handle is cleanup.
> What curl version? Curl had in the past some memory leaks.
> Test with a current version if you have used an old version.
>
> Are you sure that the memory is freed after libcurl cleanup
> and not by program end? Maybe the leak is in your code.
>
>> Is there anyone can help me?
> Use a tool like valgrind to hunt for memory leaks.
>
> And without your code it's hard to to help you.
> Can you send us at least your write callback?
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-04