cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_global_init_mem and libcurl code

From: Pavel Orehov <pcarlo_at_bezeqint.net>
Date: Mon, 10 Jan 2005 21:28:35 +0200

Hi,

For example in lib/url.c in function Curl_open, i see two mallocs and one
realloc that activated directlly. May be i am wrong, please explain.

Pavel.

----- Original Message -----
From: "Daniel Stenberg" <daniel-curl_at_haxx.se>
To: "libcurl development" <curl-library_at_cool.haxx.se>
Sent: Monday, January 10, 2005 8:46 PM
Subject: Re: curl_global_init_mem and libcurl code

> On Mon, 10 Jan 2005, Pavel Orehov wrote:
>
> > I want to use curl_global_init_mem function and give curl my callback
> > function for memory management but i see a lot in curl code (url.c,
> > transfer.c , ...) that it use malloc or some other memory functions
> > directlly and not throught callbacks.
>
> I think you failed to read the source properly. Seen lib/memory.h ?
>
> > So how can i be shure it use my callback functions
>
> You can never be sure there isn't a bug in the lib. But we use the same
> functions to track memory (leaks) in the test suite so I'm pretty
confident
> all memory-related functions are covered and use the proper callbacks.
>
> > should open BUG for each directly usage that i see in libcurl.
>
> If you can provide an example that shows a bug happen, then file a bug
report.
>
> If you only believe you spot a bug in the code, post a question here and
let
> us discuss it.
>
> --
> Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
> Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2005-01-10