From d0688dcbdf412273e276dd29135b952f2065cb5b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Jan 2021 15:30:59 +0100 Subject: socks: use the download buffer instead The SOCKS code now uses the generic download buffer for temporary storage during the connection procedure, instead of having its own private 600 byte buffer that adds to the connectdata struct size. This works fine because this point the buffer is allocated but is not use for download yet since the connection hasn't completed. This reduces the connection struct size by 22% on a 64bit arch! The SOCKS buffer needs to be at least 600 bytes, and the download buffer is guaranteed to never be smaller than 1000 bytes. Closes #6491 --- lib/url.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lib/url.h') diff --git a/lib/url.h b/lib/url.h index 6c71c1f75..ce4870ea6 100644 --- a/lib/url.h +++ b/lib/url.h @@ -23,22 +23,6 @@ ***************************************************************************/ #include "curl_setup.h" -#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE -#define READBUFFER_MAX CURL_MAX_READ_SIZE -#define READBUFFER_MIN 1024 - -/* The default upload buffer size, should not be smaller than - CURL_MAX_WRITE_SIZE, as it needs to hold a full buffer as could be sent in - a write callback. - - The size was 16KB for many years but was bumped to 64KB because it makes - libcurl able to do significantly faster uploads in some circumstances. Even - larger buffers can help further, but this is deemed a fair memory/speed - compromise. */ -#define UPLOADBUFFER_DEFAULT 65536 -#define UPLOADBUFFER_MAX (2*1024*1024) -#define UPLOADBUFFER_MIN CURL_MAX_WRITE_SIZE - /* * Prototypes for library-wide functions provided by url.c */ -- cgit v1.2.1