cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Avoid copying data in CURLOPT_WRITEFUNCTION callback

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 13 Feb 2012 13:39:17 +0100 (CET)

On Mon, 13 Feb 2012, Yehezkel Horowitz wrote:

> Currently each easy handle has its own 2 buffers with fixed size of 16K.
>
> This enforces the application that uses libcurl to copy the data when the
> callbacks are called, since it will not be valid after the callback return.

I understand perfectly.

My point was rather: if you replace libcurl's static 16K allocation with it
always asking the application to alloc 16K for each chunk that might come,
then there's no gain in memory use...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-13