libwww patch (suggested)

John Warriner <[email protected]>
Newsgroups gmane.comp.lib.libwww
Organization Choice Hotels International
Message-ID <[email protected]>
Hello,

Wonderful job on libwww!

I finding the tracing especially helpful as I am just starting to use
your library.
I had a memory leak in my prototype app and used the tracing facility to
pin it down.
However, I had to make a small change to HTMemory.c to compare where
memory was allocated to where it was freed.
I ran diff against Rev 2.95 and have attached the patch file for your
consideration.

There appear to be a couple of very small memory leaks related to
HTLoadToChunk()(in my app, an average of about 3 bytes per call). If I
find them, I'll let you know.

Thanks again for libwww!

Cheers, 

John Warriner
HTMemory.c.patch (text/plain, 477 B)
69c69,73
<     if (ptr != NULL) return ptr;
---
>     if (ptr != NULL) 
>     {
> 		HTTRACE(MEM_TRACE, "HTMemory_malloc %d @ %p\n" _ size _ (void *)ptr );
> 		return ptr;
>     }
89c93,97
<     if (ptr != NULL) return ptr;
---
>     if (ptr != NULL)
>     {
> 		HTTRACE(MEM_TRACE, "HTMemory_calloc %d @ %p\n" _ size _ (void *)ptr );
> 		return ptr;
>     }
112a121,124
>     {
> 		HTTRACE(MEM_TRACE, "HTMemory_realloc %d @ %p\n" _ size _ (void *)ptr );
> 		return ptr;
>     }
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.