diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-09-23 09:22:02 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-09-23 15:14:09 +0200 |
commit | 675eeb1c941706070381faaad8ee1a5d75cff4a4 (patch) | |
tree | 180f01d716fa508c45cea533973782817d980c5c /lib/ftp.c | |
parent | f74afa40f8b6b87ccf74a4ca70b5514a9a87e6f1 (diff) | |
download | curl-675eeb1c941706070381faaad8ee1a5d75cff4a4.tar.gz |
pingpong: use a dynbuf for the *_pp_sendf() function
... reuses the same dynamic buffer instead of doing repeated malloc/free
cycles.
Test case 100 (FTP dir list PASV) does 7 fewer memory allocation calls
after this change in my test setup (132 => 125), curl 7.72.0 needed 140
calls for this.
Test case 103 makes 9 less allocations now (130). Down from 149 in
7.72.0.
Closes #6004
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3112,6 +3112,7 @@ static CURLcode ftp_connect(struct connectdata *conn, return result; } + Curl_pp_setup(pp); /* once per transfer */ Curl_pp_init(pp); /* init the generic pingpong data */ /* When we connect, we start in the state where we await the 220 |