Re: HtNet_Delete: memory leak...???

Hi Raj,

On Tue, Aug 26, 2003 at 11:01:38AM -0400, Sinha, Raj (Raj) wrote:
> I have been trying to find this leak but with no luck. 
> 
> The embedded platform tools tell me that I am loosing about 8kb for
> every request.

Can you reproduce the problem on a platform where you can run the process
with "valgrind --leak-check=yes"? I've found valgrind to be invaluable for
this kind of thing.

This may not be helpful, but in my own app, I *don't* see a per-request 
memory leak. However, I only use simple HTTP/FTP requests, no post, no 
pipelining so far, no cookies or any other fancy things.

> And the trace of the CORE is as below. I do see that the net object is
> being deleted. Can someone point me in the right direction please. Is
> there a documented leak in HTNet_NewClient that I am not aware of...

Not for me! Maybe you should have a look at how you initialize libwww and 
which actions you perform per-download; maybe some of these actions only 
need to be performed once, after start-up. For example, things like 
HTProfile_newNoCacheClient() should only be called once, I think.

My code:
<http://cvs.berlios.de/cgi-bin/viewcvs.cgi/jigdo/jigdo/src/net/download.cc>

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key:
  | \/¯|  http://atterer.net  |  0x888354F7
  ¯ '` ¯

Received on Tuesday, 26 August 2003 16:07:51 UTC