curl-library
Re: curl_schannel.c and realloc()
From: Marc Hoersken <info_at_marc-hoersken.de>
Date: Wed, 13 Jun 2012 06:27:09 +0200
Date: Wed, 13 Jun 2012 06:27:09 +0200
Hi Daniel,
2012/6/13 Daniel Stenberg <daniel_at_haxx.se>:
> On Tue, 12 Jun 2012, Gisle Vanem wrote:
>
>> MEM curl_schannel.c:690 realloc(0xb7d828, 16384) = 0xb7d828
>
>
> Hm, reading the code, won't this always end up as BUFSIZE and thus we know
> it already?
>
If this is the case, we can probably just set
CURL_SCHANNEL_BUFFER_INIT_SIZE to BUFSIZE in order to reduce the
number of realloc() calls. I would personally keep the code to
gracefully handle the need for more buffer space.
Best regards,
Marc
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-13