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

Richard Atterer <[email protected]>
Newsgroups gmane.comp.lib.libwww
Message-ID <[email protected]>
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
  ¯ '` ¯
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.