mirror of
https://github.com/curl/curl.git
synced 2026-08-25 21:23:32 +03:00
Robert Iakobashvili made the 'master_buffer' get allocated first once it is
can/will be used as it then makes the common cases save 16KB of data for each easy handle that isn't used for pipelining.
This commit is contained in:
parent
6a35841b2e
commit
bc1ae973da
6 changed files with 30 additions and 8 deletions
|
|
@ -289,8 +289,13 @@ static void read_rewind(struct connectdata *conn,
|
|||
size_t show;
|
||||
|
||||
show = MIN(conn->buf_len - conn->read_pos, sizeof(buf)-1);
|
||||
memcpy(buf, conn->master_buffer + conn->read_pos, show);
|
||||
buf[show] = '\0';
|
||||
if (conn->master_buffer) {
|
||||
memcpy(buf, conn->master_buffer + conn->read_pos, show);
|
||||
buf[show] = '\0';
|
||||
}
|
||||
else {
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
DEBUGF(infof(conn->data,
|
||||
"Buffer after stream rewind (read_pos = %d): [%s]",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue