summaryrefslogtreecommitdiff
path: root/lib/url.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-19 15:30:59 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-20 08:54:19 +0100
commitd0688dcbdf412273e276dd29135b952f2065cb5b (patch)
treed7f684daa6f5cdec76d93634a1a327eff858cea2 /lib/url.h
parent942cf12c2f73c4bb13858acc9101b1d644bf7c50 (diff)
downloadcurl-d0688dcbdf412273e276dd29135b952f2065cb5b.tar.gz
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
Diffstat (limited to 'lib/url.h')
-rw-r--r--lib/url.h16
1 files changed, 0 insertions, 16 deletions
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
*/