]> git.ipfire.org Git - thirdparty/curl.git/commit
url: alloc the download buffer at transfer start
authorDaniel Stenberg <daniel@haxx.se>
Thu, 28 May 2020 16:30:47 +0000 (18:30 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 30 May 2020 21:14:33 +0000 (23:14 +0200)
commitc4e6968127e876b01e5e0b4b7cdbc49d5267530c
tree7d74ba1d30f99ac91b050fbb6c5b44338c56e88f
parent842f73de58f38bd6e285e08bbd1adb6c17cb62cd
url: alloc the download buffer at transfer start

... and free it as soon as the transfer is done. It removes the extra
alloc when a new size is set with setopt() and reduces memory for unused
easy handles.

In addition: the closure_handle now doesn't use an allocated buffer at
all but the smallest supported size as a stack based one.

Closes #5472
lib/conncache.c
lib/easy.c
lib/http2.c
lib/multi.c
lib/setopt.c
lib/transfer.c
lib/url.c
lib/urldata.h
tests/data/test509
tests/libtest/lib509.c